zconf_mount() {
local client=$1
local mnt=$2
- local OPTIONS=${3:-$MOUNTOPT}
+ local opts=${3:-$MOUNT_OPTS}
+ opts=${opts:+-o $opts}
+ local flags=${4:-$MOUNT_FLAGS}
local device=$MGSNID:/$FSNAME
if [ -z "$mnt" -o -z "$FSNAME" ]; then
- echo Bad zconf mount command: opt=$OPTIONS dev=$device mnt=$mnt
+ echo Bad zconf mount command: opt=$flags $opts dev=$device mnt=$mnt
exit 1
fi
- echo "Starting client: $client: $OPTIONS $device $mnt"
+ echo "Starting client: $client: $flags $opts $device $mnt"
do_node $client mkdir -p $mnt
- do_node $client $MOUNT_CMD $OPTIONS $device $mnt || return 1
+ do_node $client $MOUNT_CMD $flags $opts $device $mnt || return 1
set_default_debug_nodes $client
zconf_mount_clients() {
local clients=$1
local mnt=$2
- local OPTIONS=${3:-$MOUNTOPT}
+ local opts=${3:-$MOUNT_OPTS}
+ opts=${opts:+-o $opts}
+ local flags=${4:-$MOUNT_FLAGS}
local device=$MGSNID:/$FSNAME
if [ -z "$mnt" -o -z "$FSNAME" ]; then
- echo Bad zconf mount command: opt=$OPTIONS dev=$device mnt=$mnt
+ echo Bad zconf mount command: opt=$flags $opts dev=$device mnt=$mnt
exit 1
fi
- echo "Starting client $clients: $OPTIONS $device $mnt"
+ echo "Starting client $clients: $flags $opts $device $mnt"
do_nodes $clients "
running=\\\$(mount | grep -c $mnt' ');
rc=0;
if [ \\\$running -eq 0 ] ; then
mkdir -p $mnt;
- $MOUNT_CMD $OPTIONS $device $mnt;
+ $MOUNT_CMD $flags $opts $device $mnt;
rc=\\\$?;
fi;
exit \\\$rc" || return ${PIPESTATUS[0]}