File: runit-init.postinst

package info (click to toggle)
runit 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,220 kB
  • sloc: ansic: 5,572; sh: 3,588; makefile: 383
file content (18 lines) | stat: -rwxr-xr-x 991 bytes parent folder | download | duplicates (2)
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#