Browse Source

crypt/crypt-run-generator.sh: check if crypttab exists

master
Harald Hoyer 13 years ago
parent
commit
3d3c192621
  1. 9
      modules.d/90crypt/crypt-run-generator.sh

9
modules.d/90crypt/crypt-run-generator.sh

@ -5,10 +5,11 @@ @@ -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…
Cancel
Save