📄 server
字号:
:#!/bin/sh## @(#)server 1.5 90/01/10 NFS Rev 2 testsuite# 1.1 Lachman ONC Test Suite source## Uncomment the appropriate mount/umount commands depending upon whether# this is SysV or BSD.## run tests given a server name. mounts, tests, and unmounts# arguments:# -a|-b|-g|-s test selectors, passed to runtests# -f|-t|-n test arguments, passed to runtests# mnt_options arg to -o mount options# server_path path to mount from server# mntpoint path to mount on locally# server_name server to mount from#Program=`basename $0`InitFile="./tests.init"USAGE="usage: $Program [-a|-b|-g|-s] [-f|-t|-n] [-o mnt_options] [-p server_path] [-m mntpoint] server_name"# defaults. $InitFileset - `getopt abfgm:no:p:st $*`if [ $? != 0 ]then echo $USAGE exit 1fifor c in $*do case $c in -a|-b|-g|-s) TESTS=$c; shift ;; -f|-n|-t) TESTARG=$c; shift ;; -m) MNTPOINT=$2; shift; shift ;; -o) MNTOPTIONS=$2; shift; shift ;; -p) SERVPATH=$2; shift; shift ;; --) shift; break ;; esacdoneif test $# -gt 0then SERVER=$1 shift if test $# -gt 0 then echo $USAGE exit 1 fifi# if no server specified, exitif test x$SERVER = xthen echo $USAGE exit 1fi# make sure nothing is mounted on the mountpoint$UMOUNT $MNTPOINT > /dev/null 2>&1#if [ "$SYSTYPE" = "-DSVR3" ]then # use the following command if this is SYSV3 $MOUNT -f NFS,$MNTOPTIONS $SERVER\:$SERVPATH $MNTPOINTelse # use the following command if this is BSD $MOUNT -v -o $MNTOPTIONS $SERVER\:$SERVPATH $MNTPOINTficase $? in 0) ;; *) echo "Can't mount $SERVER:$SERVPATH on $MNTPOINT" exit 1 ;;esac# mount doesn't always return error code if it fails, so lets# ask here just in caseHOSTNAME=`hostname`HOSTNAME=`expr $HOSTNAME : '\([^.]*\)'`NFSTESTDIR=$MNTPOINT/$HOSTNAME.testexport NFSTESTDIRecho -n "Start tests on path $NFSTESTDIR [y/n]? "read anscase $ans in Y*|y*) ;; *) echo "Terminating ($MNTPOINT not unmounted)." exit 1 ;;esac echo ""echo "sh ./runtests $TESTS $TESTARG $NFSTESTDIR"sh ./runtests $TESTS $TESTARG $NFSTESTDIR# use the following command if this is SYSV3if [ "$SYSTYPE" = "-DSVR3" ]then exec $UMOUNT $MNTPOINTelse # use the following command if this is BSD exec $UMOUNT -v $MNTPOINTfi# nothing executed after here
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -