|
|
|
@ -6,8 +6,10 @@ check_current_init()
|
|
|
|
|
{ |
|
|
|
|
if [ "$(ps -o comm= 1)" = "runit" ]; then |
|
|
|
|
selected2="*" |
|
|
|
|
selected1=" " |
|
|
|
|
elif [ "$(ps -o comm= 1)" = "init" ]; then |
|
|
|
|
selected1="*" |
|
|
|
|
selected2=" " |
|
|
|
|
else |
|
|
|
|
printf "\\033[1;31mError:\\033[m Current init is not supported!\\n" |
|
|
|
|
exit 1 |
|
|
|
@ -28,8 +30,8 @@ select_init()
|
|
|
|
|
read -r NEXTINIT |
|
|
|
|
|
|
|
|
|
case $NEXTINIT in |
|
|
|
|
"openrc") ln -s "openrc-init" "/usr/bin/init" ;; |
|
|
|
|
"runit") ln -s "runit-init" "/usr/bin/init" ;; |
|
|
|
|
"openrc") ln -sf "openrc-init" "/usr/bin/init" ;; |
|
|
|
|
"runit") ln -sf "runit-init" "/usr/bin/init" ;; |
|
|
|
|
*) printf "Init does not exist/is not supported!\\n"; exit 1 ;; |
|
|
|
|
esac |
|
|
|
|
} |
|
|
|
|