aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2011-02-01 19:34:45 +0100
committerThomas Bächler <thomas@archlinux.org>2011-02-01 19:34:45 +0100
commit67ea3074e2a2e46509aab892cfea32c677deca6d (patch)
treec3cef291dc22f9106a4ee5cb5d383bc053a849f6
parentc44eccadf84ba0d9d0d449a870aad63bb03fd8d3 (diff)
downloadinitscripts-67ea3074e2a2e46509aab892cfea32c677deca6d.tar.xz
Check whether crypttab contains anything before processing it.2011.02.1
This check was removed in the bashification, add it back.
-rwxr-xr-xrc.sysinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 3ed61c7..44c3eac 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -120,7 +120,7 @@ fi
activate_vgs
# Set up non-root encrypted partition mappings
-if [[ -f /etc/crypttab && $CS ]]; then
+if [[ -f /etc/crypttab && $CS && -n $(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$) ]]; then
/sbin/modprobe -q dm-crypt 2>/dev/null
stat_busy "Unlocking encrypted volumes:"
do_unlock() {