]> sourceware.org Git - lvm2.git/commitdiff
lvm2_cluster_activation_red_hat.sh: double quote
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Jun 2017 20:12:23 +0000 (22:12 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Jun 2017 20:23:16 +0000 (22:23 +0200)
scripts/lvm2_cluster_activation_red_hat.sh.in

index abea026821e9ae133c8151c2222fe03ea2576f20..04d2cc6c09f675e552727148e876c14822d4ed48 100644 (file)
@@ -2,30 +2,30 @@
 
 sbindir=@sbindir@
 
-lvm_vgchange=${sbindir}/vgchange
-lvm_vgscan=${sbindir}/vgscan
-lvm_vgs=${sbindir}/vgs
-lvm_lvm=${sbindir}/lvm
+lvm_vgchange="${sbindir}/vgchange"
+lvm_vgscan="${sbindir}/vgscan"
+lvm_vgs="${sbindir}/vgs"
+lvm_lvm="${sbindir}/lvm"
 
 clustered_vgs() {
-       ${lvm_vgs} --noheadings -o vg_name -S 'vg_clustered=1' 2>/dev/null
+       "${lvm_vgs}" --noheadings -o vg_name -S 'vg_clustered=1' 2>/dev/null
 }
 
 activate() {
-       eval local $(${lvm_lvm} dumpconfig devices/obtain_device_list_from_udev 2>/dev/null) 2>/dev/null
+       eval local "$("${lvm_lvm}" dumpconfig devices/obtain_device_list_from_udev 2>/dev/null)" 2>/dev/null
        if [ $? -ne 0 ]; then
                echo "Warning: expected single couple of key=value in output of dumpconfig"
        fi
 
-       if [ -z $obtain_device_list_from_udev -o $obtain_device_list_from_udev -ne 1 ]; then
+       if [ -z "$obtain_device_list_from_udev" ] || [ "$obtain_device_list_from_udev" -ne 1 ]; then
                echo -n "lvm.conf option obtain_device_list_from_udev!=1: Executing vgscan"
-               ${lvm_vgscan} > /dev/null 2>&1
+               "${lvm_vgscan}" > /dev/null 2>&1
        fi
 
        echo -n "Activating ${LVM_VGS:-"all VG(s)"}: "
        # Respect activation/auto_activation_volume_list!
        # Call "-aay" which is equal to "-aly" but respects this list.
-        ${lvm_vgchange} -aay $LVM_VGS || return 1
+        "${lvm_vgchange}" -aay $LVM_VGS || return 1
 
        return 0
 }
@@ -35,10 +35,10 @@ deactivate()
        # NOTE: following section will be replaced by blkdeactivate script
        # with option supporting request to deactivate all clustered volume
        # groups in the system
-       [ -z $LVM_VGS ] && LVM_VGS="$(clustered_vgs)"
+       [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
        if [ -n "$LVM_VGS" ]; then
                echo -n "Deactivating clustered VG(s): "
-               ${lvm_vgchange} -anl $LVM_VGS || return 1
+               "${lvm_vgchange}" -anl $LVM_VGS || return 1
        fi
 
        return 0
@@ -59,4 +59,4 @@ case "$1" in
        ;;
 esac
 
-exit $rtrn
+exit "$rtrn"
This page took 0.070205 seconds and 5 git commands to generate.