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
|
#!/bin/sh
set -e
# this test make sure that runit is installable in a default system
# without causing trouble or unexpected results, and quickly caught
# regressions
# see #953875 and #960705
#check that systamd is the init (symlink of /sbin/init --> /lib/systemd/systemd )
init_symlink=$(readlink /sbin/init)
is_init="$(basename "$init_symlink")"
echo "init is "$is_init""
# attempt to install runit
echo "installing runit..."
apt-get install -y runit
echo "done"
#check that /sbin/init still points to systemd
init_symlink=$(readlink /sbin/init)
is_init=$(basename $init_symlink)
if [ "$is_init" = systemd ]; then
echo "OK: the default init is still systemd"
exit 0
else
echo "FAIL: init switched to "$is_init" "
exit 1
fi
|