mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
exclude ppp like dhcp
This commit is contained in:
@@ -458,7 +458,7 @@ class address(moduleBase):
|
||||
force_reapply = False
|
||||
try:
|
||||
# release any stale dhcp addresses if present
|
||||
if (addr_method != "dhcp" and not ifupdownflags.flags.PERFMODE and
|
||||
if (addr_method not in ["dhcp", "ppp"] and not ifupdownflags.flags.PERFMODE and
|
||||
not (ifaceobj.flags & iface.HAS_SIBLINGS)):
|
||||
# if not running in perf mode and ifaceobj does not have
|
||||
# any sibling iface objects, kill any stale dhclient
|
||||
@@ -475,7 +475,7 @@ class address(moduleBase):
|
||||
pass
|
||||
|
||||
self.ipcmd.batch_start()
|
||||
if addr_method != "dhcp":
|
||||
if addr_method not in ["dhcp", "ppp"]:
|
||||
self._inet_address_config(ifaceobj, ifaceobj_getfunc,
|
||||
force_reapply)
|
||||
self._process_mtu_config(ifaceobj, ifaceobj_getfunc)
|
||||
@@ -513,7 +513,7 @@ class address(moduleBase):
|
||||
except Exception, e:
|
||||
self.log_error('%s: %s' %(ifaceobj.name, str(e)), ifaceobj)
|
||||
|
||||
if addr_method != "dhcp":
|
||||
if addr_method not in ["dhcp", "ppp"]:
|
||||
gateways = ifaceobj.get_attr_value('gateway')
|
||||
if not gateways:
|
||||
gateways = []
|
||||
@@ -526,7 +526,7 @@ class address(moduleBase):
|
||||
if not self.ipcmd.link_exists(ifaceobj.name):
|
||||
return
|
||||
addr_method = ifaceobj.addr_method
|
||||
if addr_method != "dhcp":
|
||||
if addr_method not in ["dhcp", "ppp"]:
|
||||
if ifaceobj.get_attr_value_first('address-purge')=='no':
|
||||
addrlist = ifaceobj.get_attr_value('address')
|
||||
for addr in addrlist:
|
||||
@@ -612,7 +612,7 @@ class address(moduleBase):
|
||||
self.query_n_update_ifaceobjcurr_attr(ifaceobj, ifaceobjcurr,
|
||||
'alias', self.ipcmd.link_get_alias)
|
||||
# compare addresses
|
||||
if addr_method == 'dhcp':
|
||||
if addr_method in ["dhcp", "ppp"]:
|
||||
return
|
||||
addrs = utils.get_normalized_ip_addr(ifaceobj.name,
|
||||
self._get_iface_addresses(ifaceobj))
|
||||
|
Reference in New Issue
Block a user