forked from pool/cloud-init
fix patch syntax
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=234
This commit is contained in:
parent
9bf9eed94a
commit
b1fd5494a3
@ -8,9 +8,9 @@
|
|||||||
import ipaddress
|
import ipaddress
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -698,6 +699,12 @@ def _rename_interfaces(
|
@@ -702,6 +703,13 @@ def _rename_interfaces(
|
||||||
renames, strict_present=True, strict_busy=True, current_info=None
|
LOG.debug("no interfaces to rename")
|
||||||
):
|
return
|
||||||
|
|
||||||
+ net_devs = glob.glob('/sys/class/net/*')
|
+ net_devs = glob.glob('/sys/class/net/*')
|
||||||
+ for dev in net_devs:
|
+ for dev in net_devs:
|
||||||
@ -19,6 +19,6 @@
|
|||||||
+ if dev_name in dev_data:
|
+ if dev_name in dev_data:
|
||||||
+ del renames[renames.index(dev_data)]
|
+ del renames[renames.index(dev_data)]
|
||||||
+
|
+
|
||||||
if not len(renames):
|
if current_info is None:
|
||||||
LOG.debug("no interfaces to rename")
|
current_info = _get_current_rename_info()
|
||||||
return
|
|
||||||
|
Loading…
Reference in New Issue
Block a user