From 81c36b2f88b03b098bcf41a9036dfe06d081c74f Mon Sep 17 00:00:00 2001 From: "Kurt J. Bosch" Date: Tue, 12 Jul 2011 08:56:11 +0200 Subject: Fix/unify quoting The rules should be: * Use quotes when literal strings are involved. * Use quotes when ever using a substitution which might produce blanks as a possitional parameter unless word splitting is intended. * Use quotes on the right hand side within '[[ = ]]' unless pattern matching is intended. * Don't use quotes for substitutions where not needed as in assignments. --- rc.sysinit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 1516fba..fe1b7e6 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -96,14 +96,14 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then # $3 = password # $4 = options stat_append "${1}.." - local open=create a="$1" b="$2" failed=0 + local open=create a=$1 b=$2 failed=0 # Ordering of options is different if you are using LUKS vs. not. # Use ugly swizzling to deal with it. # isLuks only gives an exit code but no output to stdout or stderr. if $CS isLuks "$2" 2>/dev/null; then open=luksOpen - a="$2" - b="$1" + a=$2 + b=$1 fi case $3 in SWAP) @@ -179,7 +179,7 @@ declare -r FORCEFSCK run_hook sysinit_prefsck if [[ -x $(type -P fsck) ]]; then stat_busy "Checking Filesystems" - fsck_all >|${FSCK_OUT:-/dev/stdout} 2>|${FSCK_ERR:-/dev/stdout} + fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}" declare -r fsckret=$? (( fsckret <= 1 )) && stat_done || stat_fail else -- cgit v1.2.3