- Write dashes to ifroute-* files

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=128
This commit is contained in:
Robert Schweikert 2019-01-21 13:28:00 +00:00 committed by Git OBS Bridge
parent 8d961f3718
commit 3664ce1659

View File

@ -1,6 +1,6 @@
--- cloudinit/distros/opensuse.py.orig
+++ cloudinit/distros/opensuse.py
@@ -172,8 +172,37 @@ class Distro(distros.Distro):
@@ -172,8 +172,40 @@ class Distro(distros.Distro):
util.write_file(out_fn, str(conf), 0o644)
def _write_network_config(self, netconfig):
@ -30,6 +30,9 @@
+ config_routes += ' '.join([dest, gateway])
+ if dest != 'default':
+ config_routes += ' ' + route.get('netmask', '')
+ else:
+ config_routes += ' -'
+ config_routes += ' - -'
+ config_routes += '\n'
+ if config_routes:
+ route_file = '/etc/sysconfig/network/ifroute-%s' % if_name