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 ################################################################################
12 TO_UNDIVERT2="kismet.conf"
13 TO_UNDIVERT3="wlan-ng.conf"
14 TO_UNDIVERT4="smb.conf"
18 dpkg-divert --remove --rename --package grml-etc \
19 --divert $2/$1.$DEXT $2/$1 #> /dev/null
22 replace_grml_with_orig_inittab() {
23 if grep -q '^l0:0:wait:/etc/init.d/grml-halt$' /etc/inittab ; then
24 sed -i 's|^l0:0:wait:/etc/init.d/grml-halt|l0:0:wait:/etc/init.d/rc 0|' /etc/inittab
27 if grep -q '^l6:6:wait:/etc/init.d/grml-reboot$' /etc/inittab ; then
28 sed -i 's|^l6:6:wait:/etc/init.d/grml-reboot|l6:6:wait:/etc/init.d/rc 6|' /etc/inittab
34 for cmd in $TO_UNDIVERT1; do
35 undivert_gen $cmd /etc/init.d
37 for cmd in $TO_UNDIVERT2; do
38 undivert_gen $cmd /etc/kismet
40 for cmd in $TO_UNDIVERT3; do
41 undivert_gen $cmd /etc/pcmcia
43 for cmd in $TO_UNDIVERT4; do
44 undivert_gen $cmd /etc/samba
47 # make sure the ssh init script even exists if something is failing...
48 if ls /etc/init.d/ssh* 1>/dev/null 2>&1 ; then
49 if [ ! -f /etc/init.d/ssh -a /etc/init.d/ssh.original.dpkg-new ] ; then
50 mv /etc/init.d/ssh.original.dpkg-new /etc/init.d/ssh
54 replace_grml_with_orig_inittab
57 remove|abort-install|disappear)
58 replace_grml_with_orig_inittab
61 upgrade|failed-upgrade|abort-install|abort-upgrade)
65 echo "postrm called with unknown argument $1" >&2
71 ## END OF FILE #################################################################