mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
12 lines
338 B
Bash
Executable File
12 lines
338 B
Bash
Executable File
#!/bin/sh
|
|
# Generate a crypttab file for all the devices that are
|
|
# present on the system. This is a total hack since the
|
|
# rd.luks.key=/secret.key should be sufficient.
|
|
|
|
keyfile=/secret.key
|
|
|
|
for dev in /dev/sd*; do
|
|
uuid=`cryptsetup luksUUID "$dev" 2>/dev/null` || continue
|
|
echo "luks-$uuid /dev/disk/by-uuid/$uuid $keyfile luks"
|
|
done
|