Author: glen
Date: Fri Nov  9 01:37:35 2007
New Revision: 9024

Modified:
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
- initial /etc/crypttab processing

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Fri Nov  9 01:37:35 2007
@@ -268,6 +268,19 @@
                TIME_SETUP_DELAYED=yes
        fi
 
+       if [ -f /etc/crypttab ]; then
+               # XXX might need modules dep
+               # Device mapper & related initialization
+               if ! fgrep -q device-mapper /proc/devices; then
+                       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
+       fi
+
        # Start up swapping
        run_cmd "Activating swap partitions" swapon -a -e
 
@@ -419,6 +432,11 @@
                done
        fi
 
+       if [ -f /etc/crypttab ]; then
+               # XXX, this must be probably done after random is initialized 
from /var/run/random-seed
+               show "Starting disk encryption using the RNG:"
+               init_crypto 1 && ok || fail
+       fi
 else
        # Start logging console output since we have all /dev stuff setup
        if [ "$RC_BOOTLOG" ]; then
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to