setup http service on the service node

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3533 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2009-06-09 01:16:04 +00:00
parent 0bab2757bf
commit d53159268c

View File

@ -193,6 +193,16 @@ sub init_plugin
{
xCAT::Utils->update_xCATSN($service);
}
# The nfsserver field in servicenode table
# will also setup http service for Linux
if (xCAT::Utils->isLinux())
{
$rc = &setup_HTTP($nodename); # setup HTTP
if ($rc == 0)
{
xCAT::Utils->update_xCATSN('http');
}
}
}
#
@ -1016,4 +1026,33 @@ sub setup_TFTP
return $rc;
}
#-----------------------------------------------------------------------------
=head3 setup_HTTP
Sets up HTTP services on Service Node for Linux
=cut
#-----------------------------------------------------------------------------
sub setup_HTTP
{
my ($nodename) = @_;
my $rc = 0;
if (xCAT::Utils->isLinux())
{
my $os = xCAT::Utils->osver();
if ($os =~ /sles.*/) {
$rc = xCAT::Utils->startService("apache2");
}
else
{
$rc = xCAT::Utils->startService("httpd");
}
}
return $rc;
}
1;