crypt/crypt-run-generator.sh: check if crypttab exists
parent
92b3ee855f
commit
3d3c192621
|
|
@ -5,10 +5,11 @@
|
|||
dev=$1
|
||||
luks=$2
|
||||
|
||||
while read l rest; do
|
||||
strstr "${l##luks-}" "${luks##luks-}" && exit 0
|
||||
done < /etc/crypttab
|
||||
|
||||
if [ -f /etc/crypttab ]; then
|
||||
while read l rest; do
|
||||
strstr "${l##luks-}" "${luks##luks-}" && exit 0
|
||||
done < /etc/crypttab
|
||||
fi
|
||||
|
||||
echo "$luks $dev" >> /etc/crypttab
|
||||
/lib/systemd/system-generators/systemd-cryptsetup-generator
|
||||
|
|
|
|||
Loading…
Reference in New Issue