diff --git a/xCAT-server/lib/xcat/plugins/CONSsn.pm b/xCAT-server/lib/xcat/plugins/CONSsn.pm index 3d4742c66..d2dd152db 100644 --- a/xCAT-server/lib/xcat/plugins/CONSsn.pm +++ b/xCAT-server/lib/xcat/plugins/CONSsn.pm @@ -65,9 +65,9 @@ sub handled_commands # start conserver my $cmd; if (-f "/var/run/conserver.pid") { - $cmd = "/etc/rc.d/init.d/conserver restart"; + $cmd = "/etc/init.d/conserver restart"; } else { - $cmd = "/etc/rc.d/init.d/conserver start"; + $cmd = "/etc/init.d/conserver start"; } xCAT::Utils->runcmd($cmd, -1); } @@ -144,9 +144,9 @@ sub setup_CONS } else { my $cmd; if (-f "/var/run/conserver.pid") { - $cmd = "/etc/rc.d/init.d/conserver restart"; + $cmd = "/etc/init.d/conserver restart"; } else { - $cmd = "/etc/rc.d/init.d/conserver start"; + $cmd = "/etc/init.d/conserver start"; } my @out = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index 3fbbd9147..949d1ac4d 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -324,9 +324,9 @@ sub makeconservercf { #restart conserver daemon my $cmd; if (-f "/var/run/conserver.pid") { - $cmd = "/etc/rc.d/init.d/conserver restart"; + $cmd = "/etc/init.d/conserver restart"; } else { - $cmd = "/etc/rc.d/init.d/conserver start"; + $cmd = "/etc/init.d/conserver start"; } xCAT::Utils->runcmd($cmd, -1); } diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index d4b007502..ac8b9c065 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -178,7 +178,7 @@ if ($::osname eq 'Linux') # start vsftpd my $cmd = "/sbin/chkconfig vsftpd on"; my $outref = xCAT::Utils->runcmd("$cmd", 0); - my $cmd = "/etc/rc.d/init.d/vsftpd restart"; + my $cmd = "/etc/init.d/vsftpd restart"; my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -753,8 +753,8 @@ else # $syslogcmds .= "stopsrc -s syslogd;"; # $syslogcmds .= "startsrc -s syslogd;"; # } else { -# $syslogcmds .= "/etc/rc.d/init.d/syslog stop;"; -# $syslogcmds .= "/etc/rc.d/init.d/syslog start;"; +# $syslogcmds .= "/etc/init.d/syslog stop;"; +# $syslogcmds .= "/etc/init.d/syslog start;"; # } # # my $outref = xCAT::Utils->runcmd("$syslogcmds", 0); @@ -1078,7 +1078,7 @@ if ($::osname eq 'Linux') } # restart httpd - my $cmd = "/etc/rc.d/init.d/httpd stop; /etc/rc.d/init.d/httpd start"; + my $cmd = "/etc/init.d/httpd stop; /etc/init.d/httpd start"; my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 0401bfe90..1ee5a96b3 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -120,7 +120,7 @@ if [ -d /install/postscripts/.xcat ]; then mv /install/postscripts/.xcat /install/postscripts/_xcat fi chkconfig vsftpd on -/etc/rc.d/init.d/vsftpd start +/etc/init.d/vsftpd start if [ "$1" = "1" ]; then #Only if installing for the fist time.. mkdir -p /root/.ssh chmod 700 /root/.ssh @@ -141,8 +141,8 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time.. echo '/install *(rw,no_root_squash,sync)' >> /etc/exports #SECURITY: this has potential for sharing private host/user keys fi chkconfig nfs on - /etc/rc.d/init.d/nfs stop - /etc/rc.d/init.d/nfs start + /etc/init.d/nfs stop + /etc/init.d/nfs start exportfs -a if [ ! -r /etc/xcat/site.sqlite ]; then XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab key=xcatdport site.value=3001 @@ -205,8 +205,8 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time.. $RPM_INSTALL_PREFIX0/sbin/makenetworks XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab key=nameservers site.value=`sed -e 's/#.*//' /etc/resolv.conf|grep nameserver|awk '{printf $2 ","}'|sed -e s/,$//` chkconfig $apachename on - /etc/rc.d/init.d/$apachename stop - /etc/rc.d/init.d/$apachename start + /etc/init.d/$apachename stop + /etc/init.d/$apachename start echo "xCAT is now installed, it is recommended to tabedit networks and set a dynamic ip address range on any networks where nodes are to be discovered" echo "Then, run makedhcp -n to create a new dhcpd.configuration file, and /etc/init.d/dhcpd restart" echo "Either examine sample configuration templates, or write your own, or specify a value per node with nodeadd or tabedit." diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index bebca4d4e..abd51bfc2 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -60,8 +60,8 @@ if [ "$1" = "1" ]; then #Only if installing for the first time.. chkconfig httpd on if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start - /etc/rc.d/init.d/httpd stop - /etc/rc.d/init.d/httpd start + /etc/init.d/httpd stop + /etc/init.d/httpd start fi echo "xCATsn is now installed" fi