From: Benjamin Kaduk Date: Tue, 28 Oct 2014 22:53:32 +0000 (-0400) Subject: Shell quoting and subshell cleanup X-Git-Tag: debian/1.6.10-2~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=21b1c6980ba67f477d11f6d6b43a93b928d2acee;p=packages%2Fo%2Fopenafs.git Shell quoting and subshell cleanup --- diff --git a/debian/changelog b/debian/changelog index bae04d3e8..d7396da70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +openafs (1.6.10-2) UNRELEASED; urgency=medium + + * Some shell quoting and similar cleanups in openafs-client-precheck + from Anders Kaseorg. + + -- Benjamin Kaduk Tue, 28 Oct 2014 18:52:47 -0400 + openafs (1.6.10-1) unstable; urgency=medium * New upstream release. diff --git a/debian/openafs-client-precheck b/debian/openafs-client-precheck index e2927118a..877140e17 100755 --- a/debian/openafs-client-precheck +++ b/debian/openafs-client-precheck @@ -17,7 +17,7 @@ if ! [ -f "${CACHEINFO}" ]; then echo "required cacheinfo file does not exist" >&2 exit 1 fi -if ! [ -d $(awk -F : '{print $1}' < "${CACHEINFO}") ]; then +if ! [ -d "$(awk -F : '{print $1}' < "${CACHEINFO}")" ]; then echo "AFS mountpoint is not a directory or does not exist" >&2 exit 1 fi @@ -27,7 +27,7 @@ if pidof /sbin/afsd || pidof /usr/sbin/afsd; then fi # Ensure that the kernel module is loaded. -if [ -z $(/sbin/lsmod | fgrep openafs) ]; then +if ! /sbin/lsmod | grep -Fq openafs; then modprobe openafs status=$? @@ -35,7 +35,7 @@ if [ -z $(/sbin/lsmod | fgrep openafs) ]; then echo "Failed to load openafs.ko. Does it need to be built?" >&2 # We cannot fail hard on a missing module, though, as that will # cause our unit to be put in a disabled state. - if $(grep -q openafs "$MODULEROOT/modules.dep"); then + if grep -q openafs "$MODULEROOT/modules.dep"; then exit $status else cat > /var/cache/openafs-client/openafs-client.env <