forked from pool/cloud-init
- fix implementation of the openSUSE handler, properly read the configuration
from sysconfig OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=11
This commit is contained in:
parent
56a9174e6f
commit
613771aca9
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 29 21:40:00 UTC 2014 - rschweikert@suse.com
|
||||
|
||||
- fix implementation of the openSUSE handler, properly read the configuration
|
||||
from sysconfig
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 19 21:36:19 UTC 2014 - rschweikert@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -urN cloud-init-0.7.4/cloudinit/distros/opensuse.py cloud-init-0.7.4.os/cloudinit/distros/opensuse.py
|
||||
--- cloud-init-0.7.4/cloudinit/distros/opensuse.py 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ cloud-init-0.7.4.os/cloudinit/distros/opensuse.py 2013-06-15 06:26:15.312348359 -0400
|
||||
@@ -0,0 +1,86 @@
|
||||
@@ -0,0 +1,87 @@
|
||||
+# vi: ts=4 expandtab
|
||||
+#
|
||||
+# Copyright (C) 2013 SUSE LLC
|
||||
@ -25,6 +25,7 @@ diff -urN cloud-init-0.7.4/cloudinit/distros/opensuse.py cloud-init-0.7.4.os/clo
|
||||
+import os
|
||||
+
|
||||
+from cloudinit.distros import sles
|
||||
+from cloudinit.distros import rhel_util
|
||||
+
|
||||
+from cloudinit.distros.parsers.resolv_conf import ResolvConf
|
||||
+from cloudinit.distros.parsers.sys_conf import SysConf
|
||||
@ -81,7 +82,7 @@ diff -urN cloud-init-0.7.4/cloudinit/distros/opensuse.py cloud-init-0.7.4.os/clo
|
||||
+ if len(out):
|
||||
+ return out
|
||||
+ else:
|
||||
+ (_exists, contents) = self._read_conf(filename)
|
||||
+ (_exists, contents) = rhel_util.read_sysconfig_file(filename)
|
||||
+ if 'HOSTNAME' in contents:
|
||||
+ return contents['HOSTNAME']
|
||||
+ else:
|
||||
|
Loading…
Reference in New Issue
Block a user