File: postrm

package info (click to toggle)
rlinetd 0.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,968 kB
  • sloc: sh: 5,173; ansic: 3,212; yacc: 1,585; makefile: 173; lex: 131; sed: 16; perl: 4
file content (37 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# vim:ts=2:sts=2:et

set -e

undivert()
{
  if LC_ALL=C dpkg-divert --list "$1$2" | grep -q 'diversion.*rlinetd'; then
    dpkg-divert --package rlinetd --quiet --rename --remove \
      --divert "$1.real$2" "$1$2"
  fi
}



if [ "X$1" = "Xremove" ] ; then
  undivert /usr/share/man/man8/update-inetd .8.gz
  undivert /usr/sbin/update-inetd
  rm -rf /var/lib/rlinetd
fi


if [ "X$1" = "Xpurge" ] ; then
  if [ -n "`which ucf`" ]; then
    ucfq -w rlinetd | while IFS=":" read file package changed exists; do
      ucf --purge "$file"
      ucfr --purge "rlinetd" "$file"
    done
  fi
  if [ -d /etc/rlinetd.d ] ; then
    echo -n "Purging files from /etc/rlinetd.d directory..." 1>&2
    rm -rf /etc/rlinetd.d
    echo "done" 1>&2
  fi
fi

#DEBHELPER#