modprobe dm-mod
fi
- # but should do this before swapon?
. /etc/rc.d/init.d/cryptsetup
show "Starting disk encryption"
- init_crypto 0 && ok || fail
+ init_crypto 0
+ delay_cryptsetup=$?
+ [ $delay_cryptsetup = 0 ] && ok || fail
fi
# Start up swapping
done
fi
- if [ -f /etc/crypttab ] && ! is_empty_file /etc/crypttab; then
- # XXX, this must be probably done after random is initialized from /var/run/random-seed
+ if [ "$delay_cryptsetup" != 0 ]; then
show "Starting disk encryption using the RNG"
- init_crypto 1 && ok || fail
+ init_crypto 1
+ delay_cryptsetup=$?
+ [ $delay_cryptsetup = 0 ] && ok || fail
fi
else
# Start logging console output since we have all /dev stuff setup
fi
fi
+ if [ "$delay_cryptsetup" != 0 ]; then
+ show "Starting disk encryption"
+ init_crypto 1
+ delay_cryptsetup=$?
+ [ $delay_cryptsetup = 0 ] && ok || fail
+ fi
+
# Add raid devices
if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ] || [ -f /etc/raidtab ]; then
modprobe -s md >/dev/null 2>&1