tags 688200 + patch tags 688200 + pending thanks Dear maintainer,
I've prepared an NMU for fprobe (versioned as 1.1-7.3) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards. -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: DKP: Wann wir schreiten
diff -u fprobe-1.1/debian/changelog fprobe-1.1/debian/changelog --- fprobe-1.1/debian/changelog +++ fprobe-1.1/debian/changelog @@ -1,3 +1,16 @@ +fprobe (1.1-7.3) unstable; urgency=low + + * Non-maintainer upload. + * Fix "modifies conffiles (policy 10.7.3): /etc/default/fprobe": + apply recipe from debconf-devel(7): + - don't install /etc/defautl/fprobe + - create it in postinst if it doesn't exist + - read it in .config + - remove it in .postinst/purge + (Closes: #688200) + + -- gregor herrmann <gre...@debian.org> Sat, 06 Oct 2012 15:09:30 +0200 + fprobe (1.1-7.2) unstable; urgency=low * Non-maintainer upload. reverted: --- fprobe-1.1/debian/default +++ fprobe-1.1.orig/debian/default @@ -1,7 +0,0 @@ -#fprobe default configuration file - -INTERFACE="eth0" -FLOW_COLLECTOR="localhost:2055" - -#fprobe can't distinguish IP packet from other (e.g. ARP) -OTHER_ARGS="-fip" diff -u fprobe-1.1/debian/config fprobe-1.1/debian/config --- fprobe-1.1/debian/config +++ fprobe-1.1/debian/config @@ -5,6 +5,15 @@ # Use debconf. . /usr/share/debconf/confmodule +# Load config file, if it exists. +if [ -e /etc/default/fprobe ]; then + . /etc/default/fprobe || true + + # Store values from config file into debconf db. + db_set fprobe/interface "$INTERFACE" + db_set fprobe/collector "$FLOW_COLLECTOR" +fi + db_input high fprobe/interface || true db_input high fprobe/collector || true diff -u fprobe-1.1/debian/postinst fprobe-1.1/debian/postinst --- fprobe-1.1/debian/postinst +++ fprobe-1.1/debian/postinst @@ -4,10 +4,30 @@ # Use debconf. . /usr/share/debconf/confmodule -if [ "$1" = "configure" ] && [ -z "$2" ]; then +# generate default file if it doesn't exist +if [ ! -e /etc/default/fprobe ]; then + cat > /etc/default/fprobe <<-END + #fprobe default configuration file + + INTERFACE="eth0" + FLOW_COLLECTOR="localhost:2055" + + #fprobe can't distinguish IP packet from other (e.g. ARP) + OTHER_ARGS="-fip" + END +fi + +if [ "$1" = "configure" ]; then db_get fprobe/interface && interface="$RET" db_get fprobe/collector && collector="$RET" + # If the admin deleted or commented some variables but then set + # them via debconf, (re-)add them to the conffile. + test -z "$interface" || grep -Eq '^ *INTERFACE=' /etc/default/fprobe || \ + echo "INTERFACE=" >> /etc/default/fprobe + test -z "$flow_collector" || grep -Eq '^ *FLOW_COLLECTOR=' /etc/default/fprobe || \ + echo "FLOW_COLLECTOR=" >> /etc/default/fprobe + sed -i "s/^INTERFACE=.*$/INTERFACE=\"$interface\"/" /etc/default/fprobe sed -i "s/^FLOW_COLLECTOR=.*$/FLOW_COLLECTOR=\"$collector\"/" /etc/default/fprobe fi only in patch2: unchanged: --- fprobe-1.1.orig/debian/postrm +++ fprobe-1.1/debian/postrm @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = "purge" ]; then + rm -f /etc/default/fprobe +fi + +#DEBHELPER#
signature.asc
Description: Digital signature