#!/bin/sh set -e if [ -f /etc/inittab ]; then awk ' /^#runit-sysv maintscript -- BEGIN/ { flag = 1 } { if (flag == 0) print; } /^#runit-sysv maintscript -- END/ { flag = 0 } ' /etc/inittab > /etc/inittab.tmp sed -i '${/^$/d}' /etc/inittab.tmp mv /etc/inittab.tmp /etc/inittab fi if [ "$1" = "remove" ]; then # other inits maintain a compat initctl pipe, so we check that is not # systemd, that initctl exists and that sysvinit-core is installed if [ ! -d /run/systemd/system ] && [ -e /run/initctl ] ; then if [ -e /sbin/telinit ] ; then # rescan inittab to pick new entry telinit q fi fi fi # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then systemctl --system daemon-reload >/dev/null || true fi # End automatically added section # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge 'runit.service' >/dev/null || true fi fi # End automatically added section