mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-05 13:22:05 +00:00
Merge remote-tracking branch 'upstream/2.0' into statemachine
* upstream/2.0: SLES12 fix for wickedd-dhcp4
This commit is contained in:
@@ -655,6 +655,8 @@ class SuSEDistro(AbstractDistro):
|
||||
self.requiredDeps += [ "/sbin/insserv" ]
|
||||
self.init_file=suse_init_file
|
||||
self.dhcp_client_name='dhcpcd'
|
||||
if (DistInfo(fullname=1)[0] == 'SUSE Linux Enterprise Server') and (DistInfo()[1] >= '12'):
|
||||
self.dhcp_client_name='wickedd-dhcp4'
|
||||
self.grubKernelBootOptionsFile = '/boot/grub/menu.lst'
|
||||
self.grubKernelBootOptionsLine = 'kernel'
|
||||
self.getpidcmd='pidof '
|
||||
@@ -3934,6 +3936,8 @@ class Agent(Util):
|
||||
ifname=MyDistro.GetInterfaceName()
|
||||
Log("DoDhcpWork: Missing default route - adding broadcast route for DHCP.")
|
||||
Run("route add 255.255.255.255 dev " + ifname,chk_err=False) # We supress error logging on error.
|
||||
if MyDistro.dhcp_client_name == 'wickedd-dhcp4':
|
||||
Run("service " + MyDistro.dhcp_client_name + " stop",chk_err=False)
|
||||
sock.bind(("0.0.0.0", 68))
|
||||
sock.sendto(sendData, ("<broadcast>", 67))
|
||||
sock.settimeout(10)
|
||||
@@ -3961,6 +3965,8 @@ class Agent(Util):
|
||||
#We added this route - delete it
|
||||
Run("route del 255.255.255.255 dev " + ifname,chk_err=False) # We supress error logging on error.
|
||||
Log("DoDhcpWork: Removing broadcast route for DHCP.")
|
||||
if MyDistro.dhcp_client_name == 'wickedd-dhcp4':
|
||||
Run("service " + MyDistro.dhcp_client_name + " start",chk_err=False)
|
||||
return None
|
||||
|
||||
def UpdateAndPublishHostName(self, name):
|
||||
|
||||
Reference in New Issue
Block a user