Whamcloud - gitweb
LU-6345 test: compare /bin/sleep in sanity-hsm.sh test_30c
[fs/lustre-release.git] / lustre / tests / setup-nfs.sh
index 7863d40..218eb58 100755 (executable)
@@ -23,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
@@ -50,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