projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92b3ee8
)
crypt/crypt-run-generator.sh: check if crypttab exists
author
Harald Hoyer
<harald@redhat.com>
Mon, 30 Jul 2012 20:27:53 +0000
(22:27 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Mon, 30 Jul 2012 20:29:47 +0000
(22:29 +0200)
modules.d/90crypt/crypt-run-generator.sh
patch
|
blob
|
history
diff --git
a/modules.d/90crypt/crypt-run-generator.sh
b/modules.d/90crypt/crypt-run-generator.sh
index
cb3aedc
..
f2f2da1
100755
(executable)
--- a/
modules.d/90crypt/crypt-run-generator.sh
+++ b/
modules.d/90crypt/crypt-run-generator.sh
@@
-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