diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 5156d75a1..326c1e289 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1801,9 +1801,14 @@ sub setupLinuxexports if ($changed_exports) { - # restart nfs - my $cmd = "/sbin/service nfs restart"; + my $os = xCAT::Utils->osver(); + my $cmd; + if ($os =~ /sles/) { + $cmd = "/sbin/service nfsserver restart"; + } else { + $cmd = "/sbin/service nfs restart"; + } my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -1814,7 +1819,11 @@ sub setupLinuxexports xCAT::MsgUtils->message('I', "NFS has been restarted."); } - $cmd = "/sbin/chkconfig nfs on"; + if ($os =~ /sles/) { + $cmd = "/sbin/chkconfig nfsserver on"; + } else { + $cmd = "/sbin/chkconfig nfs on"; + } $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) {