summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/start
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2017-10-11 13:29:13 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-10-18 14:27:41 +0000
commit087703fae449b725ebd82bc3cd65763a016fb098 (patch)
tree34ba22f3c5547b0b6e8a29a6b10c719639ebd005 /extras/hook-scripts/start
parentf0650fef60ca557ea1c60458f705ac9b52854b39 (diff)
extras/hooks: Fix errors reported via shellcheck utility
Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa BUG: 1500649 Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'extras/hook-scripts/start')
-rwxr-xr-xextras/hook-scripts/start/post/S29CTDBsetup.sh4
-rwxr-xr-xextras/hook-scripts/start/post/S30samba-start.sh10
2 files changed, 7 insertions, 7 deletions
diff --git a/extras/hook-scripts/start/post/S29CTDBsetup.sh b/extras/hook-scripts/start/post/S29CTDBsetup.sh
index 4265cba54ee..330ce74c30e 100755
--- a/extras/hook-scripts/start/post/S29CTDBsetup.sh
+++ b/extras/hook-scripts/start/post/S29CTDBsetup.sh
@@ -21,7 +21,7 @@ VOL=
META="all"
function parse_args () {
- ARGS=$(getopt -l $OPTSPEC -name $PROGNAME $@)
+ ARGS=$(getopt -l $OPTSPEC -name $PROGNAME "$@")
eval set -- "$ARGS"
while true; do
@@ -55,7 +55,7 @@ function add_fstab_entry () {
fi
}
-parse_args $@
+parse_args "$@"
if [ "$META" = "$VOL" ]
then
mkdir -p $CTDB_MNT
diff --git a/extras/hook-scripts/start/post/S30samba-start.sh b/extras/hook-scripts/start/post/S30samba-start.sh
index 3e0f2573b60..d6b94e6bc5c 100755
--- a/extras/hook-scripts/start/post/S30samba-start.sh
+++ b/extras/hook-scripts/start/post/S30samba-start.sh
@@ -29,7 +29,7 @@ PIDDIR=
GLUSTERD_WORKDIR=
function parse_args () {
- ARGS=$(getopt -l $OPTSPEC -name $PROGNAME $@)
+ ARGS=$(getopt -l $OPTSPEC -name $PROGNAME "$@")
eval set -- "$ARGS"
while true; do
@@ -57,8 +57,8 @@ function find_config_info () {
echo "Samba is not installed"
exit 1
fi
- CONFIGFILE=`echo $cmdout | awk {'print $2'}`
- PIDDIR=`smbd -b | grep PIDDIR | awk {'print $2'}`
+ CONFIGFILE=`echo $cmdout | awk '{print $2}'`
+ PIDDIR=`smbd -b | grep PIDDIR | awk '{print $2}'`
LOGFILEBASE=`smbd -b | grep 'LOGFILEBASE' | awk '{print $2}'`
}
@@ -95,13 +95,13 @@ function get_smb () {
usersmbvalue=$(grep user.smb $GLUSTERD_WORKDIR/vols/"$volname"/info |\
cut -d"=" -f2)
- if [[ $usercifsvalue = "disable" || $usersmbvalue = "disable" ]]; then
+ if [ $usercifsvalue = "disable" ] || [ $usersmbvalue = "disable" ]; then
uservalue="disable"
fi
echo "$uservalue"
}
-parse_args $@
+parse_args "$@"
if [ "$(get_smb "$VOL")" = "disable" ]; then
exit 0
fi