--- rc.sysinit.old 2006-09-11 10:56:37.000000000 +0100 +++ rc.sysinit 2006-09-11 11:09:01.000000000 +0100 @@ -61,14 +61,16 @@ # If necessary, find md devices and manually assemble RAID arrays if [ -f /etc/mdadm.conf -a "`grep ^ARRAY /etc/mdadm.conf 2>/dev/null`" ]; then + stat_busy "Activating RAID arrays" # udev won't create these md nodes, so we do it ourselves for dev in `grep ^ARRAY /etc/mdadm.conf | awk '{print $2}'`; do path=`echo $dev | sed 's|/[^/]*$||'` node=`echo $dev | sed "s|^$path/||"` minor=`echo $node | sed 's|^[^0-9]*||'` - [ ! -f $path/$node ] && /bin/mknod $path/$node b 9 $minor + [ ! -e $path/$node ] && /bin/mknod $path/$node b 9 $minor done - status "Activating RAID arrays" /sbin/mdadm --assemble --scan + /sbin/mdadm --assemble --scan 2>&1 | filter + stat_retval fi # Unmount and free up the old initrd if it exists @@ -80,7 +82,9 @@ fi # Set up non-root encrypted partition mappings -if [ -f /etc/crypttab ]; then +if [ -f /etc/crypttab ] && grep -qv '^\(#\|$\)' /etc/crypttab; then + stat_busy "Setting up encrypted partitions" + fail=0 CS=/sbin/cryptsetup.static while read line; do [ "$line" = "" ] && continue @@ -102,26 +106,28 @@ # For some fun reason, the parameter ordering varies for # LUKS and non-LUKS devices. Joy. if `$CS isLuks $csrc 2>/dev/null`; then - echo "$cpass2" | $CS $copts luksOpen $csrc $cname >/dev/null + echo "$cpass2" | $CS $copts luksOpen $csrc $cname 2>&1 | filter else - echo "$cpass2" | $CS $copts create $cname $csrc >/dev/null + echo "$cpass2" | $CS $copts create $cname $csrc 2>&1 | filter fi else if `$CS isLuks $csrc 2>/dev/null`; then - $CS -d $cpass $copts luksOpen $csrc $cname >/dev/null + $CS -d $cpass $copts luksOpen $csrc $cname 2>&1 | filter else - $CS -d $cpass $copts create $cname $csrc >/dev/null + $CS -d $cpass $copts create $cname $csrc 2>&1 | filter fi fi + [ ${PIPESTATUS[1]} -eq 0 ] || fail=1 done