summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-21 23:57:52 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-21 23:57:52 -0700
commit264ff30c0f4424fe48d2bd70c71b68bb9e5afc59 (patch)
tree2123fc28f870ea4b119459848d92194bb47018be /bin
parentba5fb03646f6318a0ace286da746b4bb32f75d5a (diff)
downloadvyos-cloud-init-264ff30c0f4424fe48d2bd70c71b68bb9e5afc59.tar.gz
vyos-cloud-init-264ff30c0f4424fe48d2bd70c71b68bb9e5afc59.zip
Ensure that nothing was ran by checking the total count
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cloud-init3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index d193272e..aff8f967 100755
--- a/bin/cloud-init
+++ b/bin/cloud-init
@@ -92,7 +92,8 @@ def extract_fns(args):
def run_module_section(mods, action_name, section):
full_section_name = MOD_SECTION_TPL % (section)
(ran_am, failures) = mods.run_section(full_section_name)
- if not ran_am:
+ total_attempted = ran_am + len(failures)
+ if total_attempted == 0:
msg = ("No '%s' modules to run"
" under section '%s'") % (action_name, full_section_name)
sys.stderr.write("%s\n" % (msg))