Drop deprecated debian/postrm + debian/preinst
authorMichael Prokop <mika@grml.org>
Fri, 4 Jun 2021 11:14:23 +0000 (13:14 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 4 Jun 2021 11:26:00 +0000 (13:26 +0200)
With the removal of the the init scripts and moving files from
grml-etc to grml-etc-core, those maintainer files are no longer
relevant.

debian/postrm [deleted file]
debian/preinst [deleted file]

diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755 (executable)
index bdf6a0a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-# Filename:      postrm
-# Purpose:       postrm script for package grml-etc
-# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports:   see http://grml.org/bugs/
-# License:       This file is licensed under the GPL v2.
-################################################################################
-
-set -e
-
-TO_UNDIVERT1="ssh"
-
-undivert_gen() {
-    DEXT=${3:-original}
-    dpkg-divert --remove --rename --package grml-etc \
-        --divert $2/$1.$DEXT $2/$1 #> /dev/null
-}
-
-case "$1" in
-    purge)
-        for cmd in $TO_UNDIVERT1; do
-                undivert_gen $cmd /etc/init.d
-        done
-
-       # make sure the ssh init script even exists if something is failing...
-       if ls /etc/init.d/ssh* 1>/dev/null 2>&1 ; then
-         if [ ! -f /etc/init.d/ssh -a /etc/init.d/ssh.original.dpkg-new ] ; then
-            mv /etc/init.d/ssh.original.dpkg-new /etc/init.d/ssh
-         fi
-       fi
-
-     ;;
-
-   remove|abort-install|disappear)
-     ;;
-
-   upgrade|failed-upgrade|abort-install|abort-upgrade)
-     ;;
-
-    *)
-      echo "postrm called with unknown argument $1" >&2
-      exit 1
-esac
-
-#DEBHELPER#
-
-exit 0
-
-## END OF FILE #################################################################
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100755 (executable)
index 2dd6aa2..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-# Filename:      preinst
-# Purpose:       preinst script for package grml-etc
-# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports:   see http://grml.org/bugs/
-# License:       This file is licensed under the GPL v2.
-# Latest change: Mon Feb 04 15:32:00 CET 2008 [mika]
-################################################################################
-
-set -e
-
-TO_DIVERT1="ssh"
-
-divert_gen() {
-    DEXT=${3:-original}
-    dpkg-divert --add --rename --package grml-etc \
-        --divert $2/$1.$DEXT $2/$1 > /dev/null
-}
-
-undivert_gen() {
-    DEXT=${3:-original}
-    dpkg-divert --remove --rename --package grml-etc \
-        --divert $2/$1.$DEXT $2/$1 #> /dev/null
-}
-
-# move files from package grml-etc to grml-etc-core
-# and make sure we do not lose any files...
-rm_conffile() {
-    CONFFILE="$1"
-
-    if [ -e "$CONFFILE" ]; then
-        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
-        old_md5sum="`dpkg-query -W -f='${Conffiles}' grml-etc | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
-        if [ "$md5sum" != "$old_md5sum" ]; then
-            echo "Obsolete conffile $CONFFILE has been modified by you."
-            echo "Saving as $CONFFILE.dpkg-bak ..."
-            mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
-        fi
-    fi
-}
-
-case "$1" in
-   install|upgrade)
-        for cmd in $TO_DIVERT1; do
-            divert_gen $cmd /etc/init.d
-        done
-
-        # Remove files we no longer ship
-        undivert_gen "kismet.conf" /etc/kismet
-        undivert_gen "wlan-ng.conf" /etc/pcmcia
-        undivert_gen "smb.conf" /etc/samba
-
-        # move files from package grml-etc to grml-etc-core
-        for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \
-                    /etc/zsh/zshrc  /etc/zsh/zlogout  /etc/vim/vimrc ; do
-            if dpkg-divert --list $file | grep -q 'grml-etc$' ; then
-               rm_conffile $file
-               dpkg-divert --quiet --package grml-etc --remove --rename --divert $file.original $file
-            fi
-        done
-
-        if dpkg-divert --list /etc/skel/.zshrc | grep -q 'grml-etc$' ; then
-           [ -f /etc/skel/.zshrc.original ] && rm /etc/skel/.zshrc
-           dpkg-divert --quiet --package grml-etc --remove --rename --divert /etc/skel/.zshrc.original /etc/skel/.zshrc
-        fi
-
-     ;;
-   *)
-     echo "preinst called with unknown argument $1" >&2
-     exit 1
-esac
-
-#DEBHELPER#
-
-exit 0
-
-## END OF FILE #################################################################