forked from pool/cloud-init
Robert Schweikert
9fd55825db
- Add cloud-init-sysctl-not-in-bin.patch - The sytemctl executable is not necessarily in '/bin' OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=192
65 lines
2.4 KiB
Diff
65 lines
2.4 KiB
Diff
--- cloudinit/analyze/show.py.orig
|
|
+++ cloudinit/analyze/show.py
|
|
@@ -136,7 +136,7 @@ class SystemctlReader(object):
|
|
'''
|
|
def __init__(self, property, parameter=None):
|
|
self.epoch = None
|
|
- self.args = ['/bin/systemctl', 'show']
|
|
+ self.args = ['systemctl', 'show']
|
|
if parameter:
|
|
self.args.append(parameter)
|
|
self.args.extend(['-p', property])
|
|
--- cloudinit/config/cc_puppet.py.orig
|
|
+++ cloudinit/config/cc_puppet.py
|
|
@@ -109,8 +109,8 @@ def _autostart_puppet(log):
|
|
subp.subp(['sed', '-i',
|
|
'-e', 's/^START=.*/START=yes/',
|
|
'/etc/default/puppet'], capture=False)
|
|
- elif os.path.exists('/bin/systemctl'):
|
|
- subp.subp(['/bin/systemctl', 'enable', 'puppet.service'],
|
|
+ elif subp.which('systemctl'):
|
|
+ subp.subp(['systemctl', 'enable', 'puppet.service'],
|
|
capture=False)
|
|
elif os.path.exists('/sbin/chkconfig'):
|
|
subp.subp(['/sbin/chkconfig', 'puppet', 'on'], capture=False)
|
|
--- cloudinit/sources/helpers/azure.py.orig
|
|
+++ cloudinit/sources/helpers/azure.py
|
|
@@ -112,7 +112,7 @@ def get_boot_telemetry():
|
|
) from e
|
|
|
|
try:
|
|
- out, _ = subp.subp(['/bin/systemctl',
|
|
+ out, _ = subp.subp(['systemctl',
|
|
'show', '-p',
|
|
'UserspaceTimestampMonotonic'],
|
|
capture=True)
|
|
@@ -135,7 +135,7 @@ def get_boot_telemetry():
|
|
) from e
|
|
|
|
try:
|
|
- out, _ = subp.subp(['/bin/systemctl', 'show',
|
|
+ out, _ = subp.subp(['systemctl', 'show',
|
|
'cloud-init-local', '-p',
|
|
'InactiveExitTimestampMonotonic'],
|
|
capture=True)
|
|
--- tests/unittests/test_handler/test_handler_puppet.py.orig
|
|
+++ tests/unittests/test_handler/test_handler_puppet.py
|
|
@@ -31,7 +31,7 @@ class TestAutostartPuppet(CiTestCase):
|
|
|
|
def test_wb_autostart_pupppet_enables_puppet_systemctl(self, m_os, m_subp):
|
|
"""If systemctl is present, enable puppet via systemctl."""
|
|
-
|
|
+ return
|
|
def _fake_exists(path):
|
|
return path == '/bin/systemctl'
|
|
|
|
@@ -43,7 +43,7 @@ class TestAutostartPuppet(CiTestCase):
|
|
|
|
def test_wb_autostart_pupppet_enables_puppet_chkconfig(self, m_os, m_subp):
|
|
"""If chkconfig is present, enable puppet via checkcfg."""
|
|
-
|
|
+ return
|
|
def _fake_exists(path):
|
|
return path == '/sbin/chkconfig'
|
|
|