1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
# clean up old conf file
rm -f /etc/grub.d/30_init-select || true
if test "$1" = "configure"; then
db_get init-select/choose
if test "$RET" = "systemd"; then
/usr/lib/init-select/set-init /etc/default/init
update-grub || true
elif test "$RET" = "sysvinit"; then
if test -x /lib/sysvinit/init -o -e /run/init-select-nocheck; then
/usr/lib/init-select/set-init /etc/default/init /lib/sysvinit/init
update-grub || true
fi
elif test "$RET" = "openrc"; then
if test -x /sbin/openrc -o -e /run/init-select-nocheck; then
/usr/lib/init-select/set-init /etc/default/init /sbin/openrc
else
db_input high init-select/no-openrc || true
db_go
db_get init-select/no-openrc
fi
else
echo "error: unknown init somehow selected"
exit 1
fi
fi
#DEBHELPER#
|