summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-11-26 19:07:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-11-26 19:07:11 -0600
commit1211309c9cf768676f140ec462526e83e9d290cc (patch)
tree401191aa53585e1b56a549c8e55351dee0f038b3
parent113f72cc2bdb6d037a97e81237fa6377b2a4f029 (diff)
downloadsmartcardauth-1211309c9cf768676f140ec462526e83e9d290cc.tar.gz
smartcardauth-1211309c9cf768676f140ec462526e83e9d290cc.zip
Fix initramfs build failure when no LUKS disk keys are available
-rwxr-xr-xusr/share/initramfs-tools/hooks/cryptlukssc7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/share/initramfs-tools/hooks/cryptlukssc b/usr/share/initramfs-tools/hooks/cryptlukssc
index 5cf2d3d..439d0b8 100755
--- a/usr/share/initramfs-tools/hooks/cryptlukssc
+++ b/usr/share/initramfs-tools/hooks/cryptlukssc
@@ -124,6 +124,11 @@ else
fi
# LUKS keys
-cp -LRp /etc/trinity/luks/card ${DESTDIR}/tde_luks_keys
+if [ -e /etc/trinity/luks/card ]
+then
+ cp -LRp /etc/trinity/luks/card ${DESTDIR}/tde_luks_keys
+else
+ mkdir -p ${DESTDIR}/tde_luks_keys
+fi
exit 0