]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- init crypt mounts also after lvm has been run
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 7 Nov 2010 19:54:27 +0000 (19:54 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 7 Nov 2010 19:54:27 +0000 (19:54 +0000)
svn-id: @11900

rc.d/rc.sysinit

index 46a216fc2a9e47a95302ee18a78c21c18ff6e42e..0d8b5d1b38b1d24a2c50e1cdbfe674b7d6b26ff5 100755 (executable)
@@ -342,10 +342,11 @@ if ! is_yes "$VSERVER"; 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
+               init_crypto 0
+               delay_cryptsetup=$?
+               [ $delay_cryptsetup = 0 ] && ok || fail
        fi
 
        # Start up swapping
@@ -461,10 +462,11 @@ if ! is_yes "$VSERVER"; then
                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
@@ -669,6 +671,13 @@ if ! is_yes "$VSERVER"; then
                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
This page took 0.056242 seconds and 4 git commands to generate.