summaryrefslogtreecommitdiff
path: root/systemd/cloud-init-generator
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-01 00:28:52 -0500
committerScott Moser <smoser@ubuntu.com>2016-03-01 00:28:52 -0500
commitaf3653032704f79f418e976d02994c273e25f87f (patch)
tree0ddf4f39be75079db4876bf1d4ae6aa3e91237f8 /systemd/cloud-init-generator
parentc430ef68db729657f0ba9531301d63f31ac6c54c (diff)
downloadvyos-cloud-init-af3653032704f79f418e976d02994c273e25f87f.tar.gz
vyos-cloud-init-af3653032704f79f418e976d02994c273e25f87f.zip
2 fixups
Diffstat (limited to 'systemd/cloud-init-generator')
-rwxr-xr-xsystemd/cloud-init-generator7
1 files changed, 4 insertions, 3 deletions
diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator
index d97b58d9..d976ae0b 100755
--- a/systemd/cloud-init-generator
+++ b/systemd/cloud-init-generator
@@ -24,8 +24,8 @@ debug() {
etc_file() {
local pprefix="${1:-/etc/cloud/cloud-init.}"
_RET="unset"
- [ -f "${pprefix}.$ENABLE" ] && _RET="$ENABLE" && return 0
- [ -f "${pprefix}.$DISABLE" ] && _RET="$DISABLE" && return 0
+ [ -f "${pprefix}$ENABLE" ] && _RET="$ENABLE" && return 0
+ [ -f "${pprefix}$DISABLE" ] && _RET="$DISABLE" && return 0
return 0
}
@@ -77,7 +77,8 @@ main() {
for search in kernel_cmdline etc_file default; do
if $search; then
debug 1 "$search found $_RET"
- [ "$_RET" = "$ENABLE" -o "$_RET" = "$DISABLE" ] && result=$_RET
+ [ "$_RET" = "$ENABLE" -o "$_RET" = "$DISABLE" ] &&
+ result=$_RET && break
else
ret=$?
debug 0 "search $search returned $ret"