summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2014-08-13 08:34:19 -0400
committerSteve Dickson <steved@redhat.com>2014-08-13 08:48:41 -0400
commit0ed7c89ead5d425603c1e87be2b63688cf6fd3eb (patch)
tree7ca2ffdd1df6034656ff1eb6afd5252ea93ec987
parentcff0e9f58c3d5dc652c2b3455f57b7e4d4332a52 (diff)
downloadcthon04-0ed7c89ead5d425603c1e87be2b63688cf6fd3eb.tar.gz
cthon04-0ed7c89ead5d425603c1e87be2b63688cf6fd3eb.tar.xz
cthon04-0ed7c89ead5d425603c1e87be2b63688cf6fd3eb.zip
server: Added -A flag which will cause server script to ask to mount.
By default the server script will no longer ask to mount. Use the new -A flag to restore the asking about the mount Signed-off-by: Steve Dickson <steved@redhat.com>
-rwxr-xr-xserver32
1 files changed, 18 insertions, 14 deletions
diff --git a/server b/server
index 6ee7a66..e512b7d 100755
--- a/server
+++ b/server
@@ -11,6 +11,7 @@
# -c use cachefs; need to specify cachefs mount
# options with -o
# -N passes repeat "passes" times
+# -A Ask before doing the mount [default: no]
# mnt_options arg to -o mount options
# server_path path to mount from server
# mntpoint path to mount on locally
@@ -19,15 +20,16 @@
Program=`basename $0`
InitFile="./tests.init"
-USAGE="usage: $Program [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h|-C] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name"
+USAGE="usage: $Program [-a|-b|-B|-g|-s|-l|-c] [-f|-t|-n|-h|-C] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name"
# defaults
. $InitFile
export PATH CFLAGS LIBS MOUNT UMOUNT MNTOPTIONS FSOPT
passes="1"
+askt2mnt="no"
-set - `getopt abcCfF:glhm:N:no:p:st $*`
+set - `getopt aAbcCfF:glhm:N:no:p:st $*`
if [ $? != 0 ]
then
@@ -40,6 +42,7 @@ do
-a|-b|-g|-s|-l) TEST=$c; shift ;;
-f|-n|-t) TESTARG=$c; shift ;;
-c) cachefs="yes"; shift ;;
+ -A) ask2mnt="yes"; shift ;;
-C) CIFS="yes"; export CIFS; shift ;;
-h) HARDLINKS=n; export HARDLINKS; shift ;;
-m) USRMNTPOINT=$2; shift; shift ;;
@@ -126,19 +129,20 @@ HOSTNAME=`hostname`
HOSTNAME=`expr $HOSTNAME : '\([^.]*\)'`
NFSTESTDIR=$MNTPOINT/$HOSTNAME.test
export NFSTESTDIR
-#echo $DASHN "Start tests on path $NFSTESTDIR [y/n]?" "$BLC"
-#read ans
-ans="y"
-case $ans in
- Y*|y*)
- ;;
- *)
- echo "Terminating ($MNTPOINT left mounted)."
- exit 1
- ;;
-esac
-
+if test $ask2mnt = "yes"
+then
+ echo $DASHN "Start tests on path $NFSTESTDIR [y/n]?" "$BLC"
+ read ans
+ case $ans in
+ Y*|y*)
+ ;;
+ *)
+ echo "Terminating ($MNTPOINT left mounted)."
+ exit 1
+ ;;
+ esac
echo ""
+fi
if test $passes = "1"
then