3 # Purpose: postrm script for package grml-etc
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
15 dpkg-divert --remove --rename --package grml-etc \
16 --divert $2/$1.$DEXT $2/$1 #> /dev/null
19 replace_grml_with_orig_inittab() {
20 if grep -q '^l0:0:wait:/etc/init.d/grml-halt$' /etc/inittab ; then
21 sed -i 's|^l0:0:wait:/etc/init.d/grml-halt|l0:0:wait:/etc/init.d/rc 0|' /etc/inittab
24 if grep -q '^l6:6:wait:/etc/init.d/grml-reboot$' /etc/inittab ; then
25 sed -i 's|^l6:6:wait:/etc/init.d/grml-reboot|l6:6:wait:/etc/init.d/rc 6|' /etc/inittab
31 for cmd in $TO_UNDIVERT1; do
32 undivert_gen $cmd /etc/init.d
35 # make sure the ssh init script even exists if something is failing...
36 if ls /etc/init.d/ssh* 1>/dev/null 2>&1 ; then
37 if [ ! -f /etc/init.d/ssh -a /etc/init.d/ssh.original.dpkg-new ] ; then
38 mv /etc/init.d/ssh.original.dpkg-new /etc/init.d/ssh
42 replace_grml_with_orig_inittab
45 remove|abort-install|disappear)
46 replace_grml_with_orig_inittab
49 upgrade|failed-upgrade|abort-install|abort-upgrade)
53 echo "postrm called with unknown argument $1" >&2
61 ## END OF FILE #################################################################