File: postinst

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 (28 lines) | stat: -rw-r--r-- 588 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
#!/bin/sh
# vim:ts=2:sts=2:et

set -e

INETD_SCR="/etc/init.d/inetd"
INETD_CONF="/etc/inetd.conf"
RLINCONFDIR="/etc/rlinetd.d/"
UCFDIR="/var/lib/rlinetd/ucf/"


if [ "$1" = "configure" ]; then
  if [ -f "$INETD_CONF" ] && [ -z "`ls -1 $UCFDIR`" ]; then

    # source debconf library
    . /usr/share/debconf/confmodule
    db_get rlinetd/convert_from_inetd
    if [ "x$RET" = "xtrue" ] ; then
      inetd2rlinetd --add-from-comment -f "$INETD_CONF" "$RLINCONFDIR"
    fi

    inetd2rlinetd --add-from-comment --force-overwrite -f "$INETD_CONF" "$UCFDIR"

    db_stop
  fi
fi

#DEBHELPER#