1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#!/bin/sh
set -e
#install runsystem.runit as runsystem alternative in Hurd port
# when DPKG_ROOT is set, try to detect if the target root is hurd by looking for runsystem there
if { [ -z "$DPKG_ROOT" ] && [ "$(uname -s)" = 'GNU' ]; } \
|| { [ -n "$DPKG_ROOT" ] && [ -e "$DPKG_ROOT"/etc/hurd/runsystem ]; } ; then
update-alternatives --install /etc/hurd/runsystem runsystem /etc/hurd/runsystem.runit 20 \
--slave /sbin/halt halt /lib/runit/shutdown.distrib \
--slave /sbin/poweroff poweroff /lib/runit/shutdown.distrib \
--slave /sbin/reboot reboot /lib/runit/shutdown.distrib
# sysvinit aternative is shipped by initscripts so it will be still available withy sysvinit-core removed...
# this could be addressed at sysvinit package, currently initscripts is creating the sysv alternatives
# which probably could be moved to sysvinit-core, so that when the package is removed to install
# runit-init, the sysv alternative is removed too..
fi
#DEBHELPER#
|