From 76ccff5b66ca5c171679378e88452c5629759c9a Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 10 Apr 2013 15:53:33 +0000 Subject: [PATCH] fix defect 3483 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 2ea3fbdd1..f1264103c 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1843,7 +1843,13 @@ sub setupLinuxexports { # restart nfs - my $cmd = "/sbin/service nfs restart"; + my $cmd; + my $os = xCAT::Utils->osver(); + 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) { @@ -1854,7 +1860,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) {