From 3664ce16597bc825cc8a3956140838f4415911a3cb26515d7358f1c412750bbe Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Mon, 21 Jan 2019 13:28:00 +0000 Subject: [PATCH] - Write dashes to ifroute-* files OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=128 --- cloud-init-write-routes.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud-init-write-routes.patch b/cloud-init-write-routes.patch index a86f8cd..99221b9 100644 --- a/cloud-init-write-routes.patch +++ b/cloud-init-write-routes.patch @@ -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