diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-01 00:28:52 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-01 00:28:52 -0500 |
commit | af3653032704f79f418e976d02994c273e25f87f (patch) | |
tree | 0ddf4f39be75079db4876bf1d4ae6aa3e91237f8 /systemd | |
parent | c430ef68db729657f0ba9531301d63f31ac6c54c (diff) | |
download | vyos-cloud-init-af3653032704f79f418e976d02994c273e25f87f.tar.gz vyos-cloud-init-af3653032704f79f418e976d02994c273e25f87f.zip |
2 fixups
Diffstat (limited to 'systemd')
-rwxr-xr-x | systemd/cloud-init-generator | 7 |
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" |