You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
344 B
12 lines
344 B
#!/usr/bin/env sh
|
|
|
|
# CryptTab Open
|
|
|
|
while read -r NAME DEV KEY OPTS; do
|
|
if [ -f "${KEY}" ]; then
|
|
cryptsetup open "${DEV}" "${NAME}" --key-file "${KEY}"
|
|
else
|
|
cryptsetup open "${DEV}" "${NAME}"
|
|
fi
|
|
done <<< $(grep -v '^#' /etc/crypttab | sed '/^[[:space:]]*$/d' | sed 's/[[:space:]]\{1,\}/\t/g' | sed 's|UUID=|/dev/disk/by-uuid/|g')
|