summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-05-20 20:32:02 -0400
committerBill Nottingham <notting@redhat.com>2008-05-20 20:32:02 -0400
commit59f3fca22e03780771fd5d6b17a25f2b93e3736a (patch)
treeb5e1e3a78fad66d3440bdc68db7adc53861e3182
parentee3a511e55113e998a023789420fa940edc7db71 (diff)
downloadinitscripts-59f3fca22e03780771fd5d6b17a25f2b93e3736a.tar.gz
initscripts-59f3fca22e03780771fd5d6b17a25f2b93e3736a.tar.xz
initscripts-59f3fca22e03780771fd5d6b17a25f2b93e3736a.zip
Don't echo crypto stuff unless we're actually *doing* something
-rwxr-xr-xrc.d/rc.sysinit19
1 files changed, 5 insertions, 14 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 3f97da5e..32789859 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -196,9 +196,9 @@ init_crypto() {
echo "$dst: options are invalid for LUKS partitions," \
"ignoring them"
fi
- /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1
+ /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1 && success || failure
else
- /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null
+ /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null && success || failure
fi
rc=$?
if [ $rc -ne 0 ]; then
@@ -314,10 +314,7 @@ mknod /dev/mapper/control c \
[ -n "$SELINUX_STATE" ] && restorecon /dev/mapper /dev/mapper/control >/dev/null 2>&1
if [ -f /etc/crypttab ]; then
- s=$"Starting disk encryption:"
- echo "$s"
- init_crypto 0 && success "$s" || failure "$s"
- echo
+ init_crypto 0
fi
if [ -c /dev/mapper/control ]; then
@@ -348,10 +345,7 @@ if [ -c /dev/mapper/control ]; then
fi
if [ -f /etc/crypttab ]; then
- s=$"Starting disk encryption:"
- echo "$s"
- init_crypto 0 && success "$s" || failure "$s"
- echo
+ init_crypto 0
fi
if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
@@ -669,10 +663,7 @@ fi
#[ -x /sbin/rngd -a -c /dev/hw_random ] && rngd
if [ -f /etc/crypttab ]; then
- s=$"Starting disk encryption using the RNG:"
- echo "$s"
- init_crypto 1 && success "$s" || failure "$s"
- echo
+ init_crypto 1
fi
# Configure machine if necessary.