~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Ludovico Cavedon, Jordan Metzmeier, Ludovico Cavedon
  • Date: 2010-12-15 20:06:19 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20101215200619-0ojz3iak95ihibun
Tags: 3:4.0.3+dfsg1-1
[ Jordan Metzmeier ]
* New upstream release (Closes: #522042)
* Move data files to /usr/share/ntop (Closes: #595450).
* Package architecture independent data in a separate ntop-data package.
* Use debhelper 7.
* Update Standards-Version to 3.9.1.
* Depend on python-mako.
* Do not include ntop.txt in binary packages as it is a copy of the man
  page.
* Do not include NEWS, as it is outdated.
* Switch to package source version 3.0 (quilt).
* Add password creation to debconf
* Changed init script to fix localization problems (thanks to Alejandro
  Varas <alej0varas@gmail.com>, LP: #257466)
* Remove manual update-rc.d calls from postrm and postinst. debhelper adds
  this for us.
* Add pre-depends on adduser for postinst script.
* Fix errors in the manpages: fix-manpage-errors.patch.
* Added fixes for matching active interfaces.
* Added a watch file.

[ Ludovico Cavedon ]
* Remove direct changes to upstream tree, and move them into specific patch
  files:
  - fix-manpage-errors.patch: fix typos in ntop.8.
  - dot-path.patch: fix path of /usr/bin/dot executable
* Add patches:
  - reduce-autogen-purged-files.patch: prevent agutogen.sh from reamoving
  too many files during cleanup.
  - Add build-without-ntop-darwin.patch, to fix compilation without
  ntop_darwin.c.
* No longer add faq.html, as it is not distributed in the upstream tarball.
* Use ${source:Version} in control file. Have ntop-data recommend
  ntop.
* Rename dirs to ntop.dirs and keep only empty directories that need
  to be created.
* Remove var/lib from ntop.install file, as it is empty (keeping it in
  ntop.dirs).
* Update po files.
* Breaks and Replaces instead of Conflitcs for ntop-data.
* Use a longer package description.
* Remove useless configure options from debian/rules.
* Move private shared libraries libraries in /usr/lib/ntop.
* Add change-plugin-dir.patch for adjusting plugin directory.
* Remove development files.
* Use system library for MochiKit.js.
* Rewrite DEP5 copyright file.
* Repackage upstream tarball in order to remove non-DFSG-compliant code. Add
  get-orig-source.sh script and get-orig-source target in debian/rules.
* Add explanation to README.Debian why geolocation is no longer working.
* Add avoid-copy-maxmind-db.patch to prevent copying of Geo*.dat
  files.
* Remove old unused patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
#
3
 
# Copyright 2001,2002 by Dennis Schoen <ds@teuto.net>
4
 
#
5
 
# This program is free software; you can redistribute it and/or modify
6
 
# it under the terms of the GNU General Public License as published by
7
 
# the Free Software Foundation; either version 2 of the License, or
8
 
# (at your option) any later version.
9
 
#
10
 
# This program is distributed in the hope that it will be useful,
11
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
# GNU General Public License for more details.
14
 
#
15
 
# You should have received a copy of the GNU General Public
16
 
# License along with this program; if not, write to the Free
17
 
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18
 
# MA  02111-1307  USA.
19
 
 
20
 
# Source debconf library
21
 
. /usr/share/debconf/confmodule
22
 
 
23
 
# Get ntop user
24
 
 
25
 
db_get ntop/user
26
 
USER=$RET
27
 
INITCFG=/var/lib/ntop/init.cfg
28
 
db_get ntop/interfaces
29
 
INTERFACES=$RET
30
 
 
31
 
if [ -n "$USER" ] ; then
32
 
    # Creating ntop group if he isn't already there
33
 
    if ! grep -q ^$USER: /etc/passwd; then
34
 
        echo Adding system user: $USER.
35
 
        adduser --system --group --home /var/lib/ntop $USER
36
 
    fi
37
 
 
38
 
    # make status dir owned by user
39
 
    if grep -q ^$USER: /etc/passwd; then
40
 
        chown -Rf $USER /var/lib/ntop
41
 
        chown -Rf $USER /var/log/ntop
42
 
    fi
43
 
fi
44
 
 
45
 
chmod o-rx /var/lib/ntop
46
 
 
47
 
echo USER=\"$USER\" > $INITCFG
48
 
echo INTERFACES=\"$INTERFACES\" >> $INITCFG
49
 
 
50
 
db_stop
51
 
 
52
 
ldconfig
53
 
 
54
 
if [ -x "/etc/init.d/ntop" ]; then
55
 
    update-rc.d ntop defaults >/dev/null
56
 
    if [ -x /usr/sbin/invoke-rc.d ] ; then
57
 
        invoke-rc.d ntop start || true
58
 
    else
59
 
        /etc/init.d/ntop start || true
60
 
    fi
61
 
fi
62
 
 
63
 
#DEBHELPER#