~ubuntu-branches/debian/sid/rlinetd/sid

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2010-03-20 18:03:45 UTC
  • mfrom: (2.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320180345-x1srfbe2tg00ezsf
Tags: 0.7-1
* New upstream version.
* Recommend rsyslog instead of sysklogd (closes: #526922).
* update-inetd:
  + add support for enabling, disabling and removing entries;
  + use ucf for managing generated files;
  + ignore ucf files in rlinetd.conf;
  + make appropriate changes in  postinst and postrm scripts.
* Set debhelper compat level to 7
* Standards-Version: 3.8.4 (no changes). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh 
 
1
#!/bin/sh
 
2
# vim:ts=4:sts=4
 
3
# $Id: postinst 265 2009-01-02 23:51:30Z robert $
 
4
 
2
5
 
3
6
set -e
4
7
 
5
 
INETD_SCR=/etc/init.d/inetd
 
8
INETD_SCR="/etc/init.d/inetd"
 
9
INETD_CONF="/etc/inetd.conf"
 
10
RLINCONFDIR="/etc/rlinetd.d/"
 
11
UCFDIR="/var/lib/rlinetd/ucf/"
 
12
 
6
13
 
7
14
divert()
8
15
{
26
33
 
27
34
 
28
35
if [ "$1" = "configure" ]; then
29
 
        # source debconf library
30
 
        . /usr/share/debconf/confmodule
31
 
        db_get rlinetd/convert_from_inetd
32
 
        if [ "x$RET" = "xtrue" ] ; then
33
 
                inetd2rlinetd -f /etc/inetd.conf /etc/rlinetd.d 
 
36
        if [ -f "$INETD_CONF" ] && [ -z "`ls -1 $UCFDIR`" ]; then
 
37
 
 
38
                # source debconf library
 
39
                . /usr/share/debconf/confmodule
 
40
                db_get rlinetd/convert_from_inetd
 
41
                if [ "x$RET" = "xtrue" ] ; then
 
42
                        inetd2rlinetd -f "$INETD_CONF" "$RLINCONFDIR" 
 
43
                fi
 
44
 
 
45
                inetd2rlinetd --force-overwrite -f "$INETD_CONF" "$UCFDIR"
 
46
 
 
47
                db_stop
34
48
        fi
35
 
        db_stop
36
49
 
37
50
        if dpkg --compare-versions "0.6.1-2" gt-nl "$2" ; then
38
51
                if [ -f "$INETD_SCR" ] ; then
41
54
                        fi
42
55
                fi
43
56
                undivert "$INETD_SCR"
44
 
        fi              
45
 
                
 
57
        fi
 
58
 
46
59
fi
47
60
 
48
61
#DEBHELPER#