summaryrefslogtreecommitdiff
path: root/modules.d/90crypt
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-07-30 18:35:30 +0200
committerHarald Hoyer <harald@redhat.com>2012-07-30 20:41:16 +0200
commit3f7e5358e520b3d55c709a675d46c8080070276d (patch)
treec10e329547d7be90709cd812b3be8cce0e2905fa /modules.d/90crypt
parent3d352f522837ce8dc20ae130f79462e5a3cce347 (diff)
downloaddracut-3f7e5358e520b3d55c709a675d46c8080070276d.tar.gz
dracut-3f7e5358e520b3d55c709a675d46c8080070276d.tar.bz2
dracut-3f7e5358e520b3d55c709a675d46c8080070276d.zip
crypt/crypt-run-generator.sh: do not add already existing luks
Diffstat (limited to 'modules.d/90crypt')
-rwxr-xr-xmodules.d/90crypt/crypt-run-generator.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh
index d70443e9..cb3aedc6 100755
--- a/modules.d/90crypt/crypt-run-generator.sh
+++ b/modules.d/90crypt/crypt-run-generator.sh
@@ -1,8 +1,15 @@
-#!/bin/bash
+#!/bin/sh
+
+. /lib/dracut-lib.sh
dev=$1
luks=$2
+while read l rest; do
+ strstr "${l##luks-}" "${luks##luks-}" && exit 0
+done < /etc/crypttab
+
+
echo "$luks $dev" >> /etc/crypttab
/lib/systemd/system-generators/systemd-cryptsetup-generator
systemctl daemon-reload