File: postinst

package info (click to toggle)
fprobe 1.1-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 688 kB
  • ctags: 444
  • sloc: sh: 3,144; ansic: 2,177; makefile: 16
file content (28 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (3)
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 -e
# postinst script for fprobe

# Use debconf.
. /usr/share/debconf/confmodule

if [ "$1" = "configure" ] && [ -z "$2" ]; then 	  
    db_get fprobe/interface && interface="$RET"
    db_get fprobe/collector && collector="$RET"
		
    sed -i "s/^INTERFACE=.*$/INTERFACE=\"$interface\"/" /etc/default/fprobe
    sed -i "s/^FLOW_COLLECTOR=.*$/FLOW_COLLECTOR=\"$collector\"/" /etc/default/fprobe
fi	

#close all fd's
db_stop

if [ "$1" = "configure" ] && [ -f /etc/init.d/fprobe-ng ]; then
        echo "I: Removing fprobe-ng configuration files"
	rm -f /etc/init.d/fprobe-ng
	rm -f /etc/default/fprobe-ng
        update-rc.d fprobe-ng remove >/dev/null || exit 0
fi


#DEBHELPER#

exit 0