]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Shell quoting and subshell cleanup
authorBenjamin Kaduk <kaduk@mit.edu>
Tue, 28 Oct 2014 22:53:32 +0000 (18:53 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 30 Oct 2014 20:50:24 +0000 (16:50 -0400)
debian/changelog
debian/openafs-client-precheck

index bae04d3e8f4e26cdaf5fb041c32adc489e1ac093..d7396da7037acf497892981b523a4e2772df1ea7 100644 (file)
@@ -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 <kaduk@mit.edu>  Tue, 28 Oct 2014 18:52:47 -0400
+
 openafs (1.6.10-1) unstable; urgency=medium
 
   * New upstream release.
index e2927118a01aa5ff3e087875ccf37c94411dce0a..877140e17e9664cb384a48999496ad2d6b364702 100755 (executable)
@@ -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 <<EOF