[__start_on_boot] Merge alpine and gentoo, update gentoo

remotes/katolaz/master
Nico Schottelius 6 years ago
parent dbf29c18c1
commit ec935353d7
  1. 15
      cdist/conf/type/__start_on_boot/explorer/state
  2. 10
      cdist/conf/type/__start_on_boot/gencode-remote
  3. 1
      docs/changelog

@ -75,9 +75,14 @@ else
state=$(chkconfig --check "$name" "$runlevel" || echo absent)
[ "$state" ] || state="present"
;;
gentoo)
state="present"
[ -f "/etc/runlevels/${target_runlevel}/${name}" ] || state="absent"
gentoo|alpine)
state="absent"
for d in /etc/runlevels/*; do
if [ -f "/etc/runlevels/${d}/${name}" ];then
state="present"
break
fi
done
;;
freebsd)
state="absent"
@ -88,10 +93,6 @@ else
# OpenBSD 5.7 and higher
rcctl ls on | grep "^${name}$" && state='present'
;;
alpine)
state="$(rc-update show | sed 's/ *//' | grep -q "^${name} |" && echo present)"
[ "$state" ] || state="absent"
;;
*)
echo "Unsupported os: $os" >&2

@ -40,9 +40,6 @@ case "$state_should" in
echo "systemctl -q enable '$name'"
else
case "$os" in
alpine)
echo "rc-update -q add '${name}'"
;;
debian)
case "$os_version" in
[1-7]*)
@ -61,7 +58,7 @@ case "$state_should" in
echo "update-rc.d '$name' defaults >/dev/null"
;;
gentoo)
alpine|gentoo)
echo "rc-update add '$name' '$target_runlevel'"
;;
@ -105,14 +102,11 @@ case "$state_should" in
else
case "$os" in
alpine)
echo "rc-update -q del '${name}'"
;;
debian|ubuntu|devuan)
echo "update-rc.d -f '$name' remove"
;;
gentoo)
alpine|gentoo)
echo "rc-update del '$name' '$target_runlevel'"
;;

@ -3,6 +3,7 @@ Changelog
next:
* Type __package: Add __package_apk support (Nico Schottelius)
* Type __start_on_boot: Add alpine support (Nico Schottelius)
* New type: __package_apk (Nico Schottelius)
4.10.11: 2019-04-13

Loading…
Cancel
Save