Skip to contentSkip to conversation

crypt: Skip /etc/crypttab if not present

PATCH In review Amadeusz Żołnowski 3 participants 3 messages Jul 25, 2013 – Aug 6, 2013 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypt: Skip /etc/crypttab if not present

Prevents following error message:

I: *** Including module: crypt *** /usr/lib/dracut/modules.d/90crypt/module-setup.sh: line 31: /etc/crypttab: No such file or directory

---
 modules.d/90crypt/module-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/90crypt/module-setup.sh +1 -1
index 639a77f..6b32b6a 100755
@@ -57,7 +57,7 @@ install() {
         inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
     fi
 
-    if [[ $hostonly ]]; then
+    if [[ $hostonly ]] && [[ -f /etc/cryptab ]]; then
         # filter /etc/crypttab for the devices we need
         while read _mapper _dev _rest; do
             [[ $_mapper = \#* ]] && continue
Signature · 1 line
1.8.3.2

A message that is not in the archive (sent off-list or not yet received): 1374787724-27608-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org

#2 lore raw
Quoted 14 lines · Amadeusz Å»oÅ‚nowski

Prevents following error message:

I: *** Including module: crypt *** /usr/lib/dracut/modules.d/90crypt/module-setup.sh: line 31: /etc/crypttab: No such file or directory

---
 modules.d/90crypt/module-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/90crypt/module-setup.sh +0 -0
index 639a77f..6b32b6a 100755

modules.d/90crypt/module-setup.sh install() { · line 63

Quoted 8 lines
modules.d/90crypt/module-setup.sh +1 -1
@@ -57,7 +57,7 @@ install() {
         inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
     fi
 
-    if [[ $hostonly ]]; then
+    if [[ $hostonly ]] && [[ -f /etc/cryptab ]]; then
         # filter /etc/crypttab for the devices we need
         while read _mapper _dev _rest; do
             [[ $_mapper = \#* ]] && continue

pushed, thanks!

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

PATCH 1/1 crypt: Fix typo--/etc/crypttab not /etc/cryptab

1ae8b8a breaks the crypt module for those who use keyfiles due to a typo leading to the exclusion of /etc/crypttab from the initrd.

---
 modules.d/90crypt/module-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/90crypt/module-setup.sh +1 -1
index 6b32b6a..31e0e5f 100755
@@ -57,7 +57,7 @@ install() {
         inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
     fi
 
-    if [[ $hostonly ]] && [[ -f /etc/cryptab ]]; then
+    if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
         # filter /etc/crypttab for the devices we need
         while read _mapper _dev _rest; do
             [[ $_mapper = \#* ]] && continue
Signature · 1 line
1.8.1.2