--- rc.sysinit.f10orig 2009-03-12 15:17:09.000000000 +0000 +++ rc.sysinit 2009-03-12 16:20:40.000000000 +0000 @@ -141,9 +141,13 @@ echo $"INSECURE OWNER FOR $key" fi else - echo $"Key file for $dst not found, skipping" - ret=1 - continue + if strstr "$dst" home; then + key="/mnt/.home.key.gpg" + else + echo $"Key file for $dst not found, skipping" + ret=1 + continue + fi fi else key="" @@ -221,16 +225,21 @@ echo "$dst: options are invalid for LUKS partitions," \ "ignoring them" fi - if [ -n "$key" ]; then - /sbin/cryptsetup -d $key luksOpen "$src" "$dst" <&1 2>/dev/null && success || failure + file=`basename $key 2>/dev/null` + if [ -e "$key" ] && [[ "$file" =~ "[a-zA-Z].gpg" ]]; then + prompt=$(printf $"Enter your GPG passphrase to unlock %s" "$dst") + cmd="/usr/bin/gpg --homedir=/etc/gnupg/ --no-default-keyring --no-use-agent --no-auto-check-trustdb --no-permission-warning --skip-verify --no-tty --passphrase-fd 0 --decrypt $key" + plymouth ask-for-password --number-of-tries=3 --prompt "$prompt" --command="$cmd" <&1 | /sbin/cryptsetup luksOpen -T1 $src $dst && success || failure else - mount_point="$(find_crypto_mount_point $dst)" - [ -n "$mount_point" ] || mount_point=${src##*/} - prompt=$(printf $"%s is password protected" "$mount_point") - plymouth ask-for-password --prompt "$prompt" --command="/sbin/cryptsetup luksOpen -T1 $src $dst" <&1 + if strstr "$dst" home; then + key="none" + fi + mount_point="$(find_crypto_mount_point $dst)" + [ -n "$mount_point" ] || mount_point=${src##*/} + prompt=$(printf $"%s is password protected" "$mount_point") + plymouth ask-for-password --prompt "$prompt" --command="/sbin/cryptsetup luksOpen -T1 $src $dst" <&1 fi else - #plymouth --hide-splash /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null && success || failure fi rc=$? @@ -345,7 +353,11 @@ fi if [ -f /etc/crypttab ]; then + modprobe usb_storage + sleep 5 + mount -n -t vfat -o ro,umask=377 /dev/sdb1 /mnt init_crypto 0 + umount /mnt 2>/dev/null fi if ! strstr "$cmdline" nompath && [ -f /etc/multipath.conf -a \