File: runit.postrm

package info (click to toggle)
runit 1.7.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 192 kB
  • ctags: 11
  • sloc: makefile: 84; sh: 69
file content (14 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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 >/etc/inittab'{new}'
  mv -f /etc/inittab'{new}' /etc/inittab
  kill -s HUP 1 || :
fi
test "$1" != 'purge' || rm -rf /var/run/getty-5