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 ################################################################################
11 TO_UNDIVERT1="login.config mgetty.config"
13 TO_UNDIVERT3="kismet.conf"
14 TO_UNDIVERT4="wlan-ng.conf"
15 TO_UNDIVERT5="smb.conf"
16 TO_UNDIVERT6="windowlab.menurc"
20 dpkg-divert --remove --rename --package grml-etc \
21 --divert $2/$1.$DEXT $2/$1 #> /dev/null
24 replace_grml_with_orig_inittab() {
25 if grep -q '^l0:0:wait:/etc/init.d/grml-halt$' /etc/inittab ; then
26 sed -i 's|^l0:0:wait:/etc/init.d/grml-halt|l0:0:wait:/etc/init.d/rc 0|' /etc/inittab
29 if grep -q '^l6:6:wait:/etc/init.d/grml-reboot$' /etc/inittab ; then
30 sed -i 's|^l6:6:wait:/etc/init.d/grml-reboot|l6:6:wait:/etc/init.d/rc 6|' /etc/inittab
36 for cmd in $TO_UNDIVERT1; do
37 undivert_gen $cmd /etc/mgetty
39 for cmd in $TO_UNDIVERT2; do
40 undivert_gen $cmd /etc/init.d
42 for cmd in $TO_UNDIVERT3; do
43 undivert_gen $cmd /etc/kismet
45 for cmd in $TO_UNDIVERT4; do
46 undivert_gen $cmd /etc/pcmcia
48 for cmd in $TO_UNDIVERT5; do
49 undivert_gen $cmd /etc/samba
51 for cmd in $TO_UNDIVERT6; do
52 undivert_gen $cmd /etc/X11/windowlab
55 # make sure the ssh init script even exists if something is failing...
56 if ls /etc/init.d/ssh* 1>/dev/null 2>&1 ; then
57 if [ ! -f /etc/init.d/ssh -a /etc/init.d/ssh.original.dpkg-new ] ; then
58 mv /etc/init.d/ssh.original.dpkg-new /etc/init.d/ssh
62 replace_grml_with_orig_inittab
65 remove|abort-install|disappear)
66 replace_grml_with_orig_inittab
69 upgrade|failed-upgrade|abort-install|abort-upgrade)
73 echo "postrm called with unknown argument $1" >&2
79 ## END OF FILE #################################################################