From af3653032704f79f418e976d02994c273e25f87f Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 1 Mar 2016 00:28:52 -0500 Subject: 2 fixups --- systemd/cloud-init-generator | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'systemd') 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" -- cgit v1.2.3