changed /etc/rc.d/init.d to /etc/init.d so code works on SLES as well.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2361 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2008-10-17 17:59:57 +00:00
parent fb17a889c3
commit 4018516186
5 changed files with 17 additions and 17 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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)
{

View File

@ -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."

View File

@ -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