#!/bin/sh set -e test "$1" = 'remove' || test "$1" = 'purge' || exit 0 if grep '#-- runit begin' /etc/inittab >/dev/null; then echo 'Removing SV inittab entry...' rm -f /etc/inittab'{new}' sed -e '/#-- runit begin/,/#-- runit end/d' \ /etc/inittab'{new}' mv -f /etc/inittab'{new}' /etc/inittab kill -s HUP 1 || : fi test "$1" != 'purge' || rm -rf /var/run/getty-5