From dbf29c18c124f4c9b9026180819ec2cfba6c1e16 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 15 Apr 2019 16:41:27 +0200 Subject: [PATCH] [__start_on_boot] alpine fix --- cdist/conf/type/__start_on_boot/explorer/state | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__start_on_boot/explorer/state b/cdist/conf/type/__start_on_boot/explorer/state index 75764979..37f41806 100644 --- a/cdist/conf/type/__start_on_boot/explorer/state +++ b/cdist/conf/type/__start_on_boot/explorer/state @@ -89,8 +89,10 @@ else rcctl ls on | grep "^${name}$" && state='present' ;; alpine) - state="absent" - rc-update show | sed 's/ *//' | grep -q "^${name} |" && state="present" + state="$(rc-update show | sed 's/ *//' | grep -q "^${name} |" && echo present)" + [ "$state" ] || state="absent" + ;; + *) echo "Unsupported os: $os" >&2 exit 1