| 1 | #!/bin/sh |
| 2 | # vim:ts=2:sts=2:et |
| 3 | |
| 4 | set -e |
| 5 | |
| 6 | undivert() |
| 7 | { |
| 8 | if LC_ALL=C dpkg-divert --list "$1$2" | grep -q 'diversion.*rlinetd'; then |
| 9 | dpkg-divert --package rlinetd --quiet --rename --remove \ |
| 10 | --divert "$1.real$2" "$1$2" |
| 11 | fi |
| 12 | } |
| 13 | |
| 14 | |
| 15 | |
| 16 | if [ "X$1" = "Xremove" ] ; then |
| 17 | undivert /usr/share/man/man8/update-inetd .8.gz |
| 18 | undivert /usr/sbin/update-inetd |
| 19 | rm -rf /var/lib/rlinetd |
| 20 | fi |
| 21 | |
| 22 | |
| 23 | if [ "X$1" = "Xpurge" ] ; then |
| 24 | if [ -n "`which ucf`" ]; then |
| 25 | ucfq -w rlinetd | while IFS=":" read file package changed exists; do |
| 26 | ucf --purge "$file" |
| 27 | ucfr --purge "rlinetd" "$file" |
| 28 | done |
| 29 | fi |
| 30 | if [ -d /etc/rlinetd.d ] ; then |
| 31 | echo -n "Purging files from /etc/rlinetd.d directory..." 1>&2 |
| 32 | rm -rf /etc/rlinetd.d |
| 33 | echo "done" 1>&2 |
| 34 | fi |
| 35 | fi |
| 36 | |
| 37 | #DEBHELPER# |