fix for bug 4515: start isc-dhcp-server when starting xcatd on Ubuntu MN
This commit is contained in:
parent
b040807148
commit
93e00147f8
@ -185,6 +185,13 @@ sub isServiceReq
|
||||
if (!exists($servicehash->{'tftpserver'})) {
|
||||
$servicehash->{'tftpserver'} = 1;
|
||||
}
|
||||
# On Ubuntu management node, we disabled the isc-dhcp-server in upstart,
|
||||
# through file /etc/init/isc-dhcp-server.override, see bug 4399
|
||||
# however, this causes a new problem, bug 4515
|
||||
# the fix is to start dhcp server when starting xcatd
|
||||
if (!exists($servicehash->{'dhcpserver'}) && xCAT::Utils->osver() =~ /ubuntu.*/i) {
|
||||
$servicehash->{'dhcpserver'} = 1;
|
||||
}
|
||||
}
|
||||
$servicenodetab->close;
|
||||
|
||||
|
@ -544,9 +544,13 @@ sub setup_DHCP
|
||||
if (xCAT::Utils->isMN()) { # on the MN
|
||||
#my @output = xCAT::Utils->runcmd("service dhcpd status", -1);
|
||||
#if ($::RUNCMD_RC != 0) { # not running
|
||||
my $retcode= xCAT::Utils->checkservicestatus("dhcpd");
|
||||
my $dhcpservice = "dhcpd";
|
||||
if (-e "/etc/init.d/isc-dhcp-server") { #Ubuntu
|
||||
$dhcpservice = "isc-dhcp-server";
|
||||
}
|
||||
my $retcode= xCAT::Utils->checkservicestatus($dhcpservice);
|
||||
if($retcode!=0){
|
||||
$rc = xCAT::Utils->startservice("dhcpd");
|
||||
$rc = xCAT::Utils->startservice($dhcpservice);
|
||||
if ($rc != 0)
|
||||
{
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user