diff options
Diffstat (limited to 'source/a/sysvinit-scripts/scripts')
-rw-r--r-- | source/a/sysvinit-scripts/scripts/rc.6 | 20 | ||||
-rw-r--r-- | source/a/sysvinit-scripts/scripts/rc.M | 5 |
2 files changed, 7 insertions, 18 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.6 b/source/a/sysvinit-scripts/scripts/rc.6 index 47cf292ff..21b5c4782 100644 --- a/source/a/sysvinit-scripts/scripts/rc.6 +++ b/source/a/sysvinit-scripts/scripts/rc.6 @@ -299,24 +299,8 @@ fi /bin/sync # Close any volumes opened by cryptsetup: -if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then - cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do - # NOTE: we only support LUKS formatted volumes (except for swap)! - LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ') - DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ') - OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ') - if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then - echo "Locking LUKS crypt volume '${LUKS}':" - /sbin/cryptsetup luksClose ${LUKS} - elif echo $OPTS | grep -wq swap ; then - # If any of the volumes was used as encrypted swap, - # then run mkswap on the underlying device - - # in case other Linux installations on this computer should use it: - echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:" - /sbin/cryptsetup remove ${LUKS} - mkswap $DEV - fi - done +if [ -x /etc/rc.d/rc.luks ]; then + /etc/rc.d/rc.luks stop fi # Deactivate LVM volume groups: diff --git a/source/a/sysvinit-scripts/scripts/rc.M b/source/a/sysvinit-scripts/scripts/rc.M index 3df971d5d..1fec96d0d 100644 --- a/source/a/sysvinit-scripts/scripts/rc.M +++ b/source/a/sysvinit-scripts/scripts/rc.M @@ -149,6 +149,11 @@ if [ -x /etc/rc.d/rc.inet2 ]; then /etc/rc.d/rc.inet2 fi +# Unlock any LUKS devices that still aren't unlocked: +if [ -x /etc/rc.d/rc.luks ]; then + /etc/rc.d/rc.luks start +fi + # Mount any additional filesystem types that haven't already been mounted: mount -a -v 2> /dev/null | grep -v -e "already mounted" -e "ignored" | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done |