X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsetup-nfs.sh;h=218eb5833127a45dafe473209a6cdd59922ca00b;hb=7ec56e2628a908343c9c60396e63f8e7093821b5;hp=97c8c31c401b3b971ae07fa667a0943265122521;hpb=4ac9f1ad9ca68de0df7ce0d6451c29a5ff3be1b9;p=fs%2Flustre-release.git diff --git a/lustre/tests/setup-nfs.sh b/lustre/tests/setup-nfs.sh index 97c8c31..218eb58 100755 --- a/lustre/tests/setup-nfs.sh +++ b/lustre/tests/setup-nfs.sh @@ -1,5 +1,4 @@ #!/bin/bash -# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: #set -x EXPORT_OPTS=${EXPORT_OPTS:-"rw,async,no_root_squash"} @@ -24,7 +23,9 @@ setup_nfs() { do_nodes $LUSTRE_CLIENT "service nfs restart" || return 1 - do_nodes $NFS_CLIENTS "service rpcidmapd restart" || return 1 + do_nodes $NFS_CLIENTS "chkconfig --list rpcidmapd 2>/dev/null | + grep -q rpcidmapd && service rpcidmapd restart || + true" do_nodes $LUSTRE_CLIENT "exportfs -o $export_opts_v *:$MNTPNT \ && exportfs -v" || return 1 @@ -51,8 +52,10 @@ cleanup_nfs() { echo -e "\nUnmounting NFS clients..." do_nodes $NFS_CLIENTS "umount -f $MNTPNT" || return 1 - echo -e "\nUnexporting Lustre filesystem..." - do_nodes $NFS_CLIENTS "service rpcidmapd stop" || return 1 + echo -e "\nUnexporting Lustre filesystem..." + do_nodes $NFS_CLIENTS "chkconfig --list rpcidmapd 2>/dev/null | + grep -q rpcidmapd && service rpcidmapd stop || + true" do_nodes $LUSTRE_CLIENT "service nfs stop" || return 1