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

« back to all changes in this revision

Viewing changes to debian/patches/ntop.config.diff

  • 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
 
diff -Nru ntop-3.2.old/debian/config ntop-3.2/debian/config
2
 
--- ntop-3.2.old/debian/config  2006-03-07 17:29:03.000000000 +0100
3
 
+++ ntop-3.2/debian/config      2006-03-07 18:14:02.000000000 +0100
4
 
@@ -20,6 +20,22 @@
5
 
 # Source debconf library
6
 
 . /usr/share/debconf/confmodule
7
 
 
8
 
+check_interfaces() {
9
 
+# Check the interface status, abort with error if a configured one is not
10
 
+# available
11
 
+        [ -z "$INTERFACES" ] && return 0
12
 
+        { echo $INTERFACES | awk -F , '{ for(i=1;i<=NF;i++) print $i }' |
13
 
+        while read iface ; do
14
 
+                if ! ifconfig "$iface" | grep -w UP >/dev/null; then
15
 
+                        return 1
16
 
+                fi
17
 
+        done
18
 
+       return 0
19
 
+        }
20
 
+        return $?
21
 
+}
22
 
+
23
 
+
24
 
 if [ -e /etc/ntop/init.cfg ] && [ ! -e /var/lib/ntop/init.cfg ]; then
25
 
     cp -a /etc/ntop/init.cfg /etc/ntop/init.cfg.dpkg-old || true
26
 
     mv /etc/ntop/init.cfg /var/lib/ntop/init.cfg || true
27
 
@@ -32,7 +48,16 @@
28
 
   db_set ntop/interfaces $INTERFACES
29
 
 fi
30
 
 
31
 
-db_input medium ntop/interfaces || true
32
 
+# Interface default in case /var/lib/ntop/init.cfg does not exist
33
 
+[ -z "$INTERFACES" ]  && INTERFACES=eth0
34
 
+# Depending on whether the default interface is up or down we set the
35
 
+# question priority
36
 
+if check_interfaces
37
 
+then
38
 
+       db_input medium ntop/interfaces || true
39
 
+else
40
 
+       db_input high ntop/interfaces || true
41
 
+fi
42
 
 db_go
43
 
 db_get ntop/interfaces
44
 
 INTERFACES=$RET