diff options
author | Scott Moser <smoser@ubuntu.com> | 2017-09-25 14:29:13 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2017-09-25 14:29:13 -0400 |
commit | ad099a53d120e88719a5ad50f29d22e9f7a52bc7 (patch) | |
tree | ca7b3f07b127d15713e5db2b5d1a70858668dc29 | |
parent | da6562e21d0b17a0957adc0c5a2c9da076e0d219 (diff) | |
download | vyos-cloud-init-ad099a53d120e88719a5ad50f29d22e9f7a52bc7.tar.gz vyos-cloud-init-ad099a53d120e88719a5ad50f29d22e9f7a52bc7.zip |
AltCloud: Trust PATH for udevadm and modprobe.
Previously we had hard coded paths in /sbin for the udevadm and modprobe
programs invoked by AltCloud. Its more flexible to expect the PATH to
be set correctly.
Debian: #852564
-rw-r--r-- | cloudinit/sources/DataSourceAltCloud.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_altcloud.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceAltCloud.py b/cloudinit/sources/DataSourceAltCloud.py index ed1d691a..c78ad9eb 100644 --- a/cloudinit/sources/DataSourceAltCloud.py +++ b/cloudinit/sources/DataSourceAltCloud.py @@ -28,8 +28,8 @@ LOG = logging.getLogger(__name__) CLOUD_INFO_FILE = '/etc/sysconfig/cloud-info' # Shell command lists -CMD_PROBE_FLOPPY = ['/sbin/modprobe', 'floppy'] -CMD_UDEVADM_SETTLE = ['/sbin/udevadm', 'settle', '--timeout=5'] +CMD_PROBE_FLOPPY = ['modprobe', 'floppy'] +CMD_UDEVADM_SETTLE = ['udevadm', 'settle', '--timeout=5'] META_DATA_NOT_SUPPORTED = { 'block-device-mapping': {}, diff --git a/tests/unittests/test_datasource/test_altcloud.py b/tests/unittests/test_datasource/test_altcloud.py index 3b274d90..a4dfb540 100644 --- a/tests/unittests/test_datasource/test_altcloud.py +++ b/tests/unittests/test_datasource/test_altcloud.py @@ -280,8 +280,8 @@ class TestUserDataRhevm(TestCase): pass dsac.CLOUD_INFO_FILE = '/etc/sysconfig/cloud-info' - dsac.CMD_PROBE_FLOPPY = ['/sbin/modprobe', 'floppy'] - dsac.CMD_UDEVADM_SETTLE = ['/sbin/udevadm', 'settle', + dsac.CMD_PROBE_FLOPPY = ['modprobe', 'floppy'] + dsac.CMD_UDEVADM_SETTLE = ['udevadm', 'settle', '--quiet', '--timeout=5'] def test_mount_cb_fails(self): |