Browse Source

make crypt more failsafe

master
Harald Hoyer 16 years ago
parent
commit
e548dabcef
  1. 2
      modules.d/90crypt/63-luks.rules
  2. 3
      modules.d/90crypt/cryptroot.sh

2
modules.d/90crypt/63-luks.rules

@ -5,7 +5,7 @@




SUBSYSTEM!="block", GOTO="luks_end" SUBSYSTEM!="block", GOTO="luks_end"
ACTION!="add", GOTO="luks_end" ACTION!="add|change", GOTO="luks_end"


KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/bin/sh -c 'echo $env{DEVNAME} luks-$env{ID_FS_UUID} >>/cryptroot'" ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/bin/sh -c 'echo $env{DEVNAME} luks-$env{ID_FS_UUID} >>/cryptroot'"

3
modules.d/90crypt/cryptroot.sh

@ -3,7 +3,8 @@
udevadm control --stop-exec-queue udevadm control --stop-exec-queue
while read cryptopts; do while read cryptopts; do
( exec >/dev/console 2>&1 </dev/console ( exec >/dev/console 2>&1 </dev/console
/sbin/cryptsetup luksOpen $cryptopts || emergency_shell set $cryptopts
[ -b /dev/mapper/$2 ] || ( /sbin/cryptsetup luksOpen $cryptopts || emergency_shell )
) )
done </cryptroot done </cryptroot
>/cryptroot >/cryptroot

Loading…
Cancel
Save