diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-07-31 14:18:55 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-07-31 14:18:55 -0400 |
commit | eb6f294ff89696651b6ba4bda97f05ed6e0dfcf0 (patch) | |
tree | c8e610c84aea938112d5950e5e67dd483d20328e /cloudinit/config | |
parent | de57d05b5039d13c3dda5fb0382287b847517954 (diff) | |
download | vyos-cloud-init-eb6f294ff89696651b6ba4bda97f05ed6e0dfcf0.tar.gz vyos-cloud-init-eb6f294ff89696651b6ba4bda97f05ed6e0dfcf0.zip |
exit and warn if no 'dpkg' (probably wrong distro)
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_ubuntu_init_switch.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_ubuntu_init_switch.py b/cloudinit/config/cc_ubuntu_init_switch.py index faa41ede..485c46a4 100644 --- a/cloudinit/config/cc_ubuntu_init_switch.py +++ b/cloudinit/config/cc_ubuntu_init_switch.py @@ -102,6 +102,10 @@ def handle(name, cfg, cloud, log, args): log.debug("%s: target=%s. nothing to do", name, target) return + if not util.which('dpkg'): + log.warn("%s: 'dpkg' not available. Assuming not ubuntu", name) + return + supported = ('upstart', 'systemd') if target not in supported: log.warn("%s: target set to %s, expected one of: %s", |