diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-08-11 13:19:21 -0400 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-08-11 19:38:07 +0200 |
commit | a969f05ed3ead0f422c14dd750197f201f7ebb15 (patch) | |
tree | 09cd14bd68a1e8e682cf0bd3622c99844dba0ea2 | |
parent | ac6b435d40c8295fcc0fc4cb751ccd092a77e433 (diff) |
functions: support UUID tags in /etc/crypttab
As per crypttab(5), this is supported. This also adds forward looking support
for PARTUUID, which is valid and should "just work" for GPT partitioned disks.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | functions | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -475,6 +475,16 @@ do_unlock_legacy() { do_unlock_systemd() { local name=$1 device=$2 password=$3 options=$4 failed=0 + # lazily convert tags to udev symlinks + case $device in + UUID=*) + device=/dev/disk/by-uuid/${device#UUID=} + ;; + PARTUUID=*) + device=/dev/disk/by-partuuid/${device#PARTUUID=} + ;; + esac + if ! /usr/lib/systemd/systemd-cryptsetup attach "$name" "$device" "$password" $options; then failed=1 else |