make crypt more failsafe

This commit is contained in:
Harald Hoyer 2009-03-05 14:47:00 +01:00
parent 879305557c
commit e548dabcef
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@
SUBSYSTEM!="block", GOTO="luks_end"
ACTION!="add", GOTO="luks_end"
ACTION!="add|change", GOTO="luks_end"
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'"

View File

@ -3,7 +3,8 @@
udevadm control --stop-exec-queue
while read cryptopts; do
( 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
>/cryptroot