File: config

package info (click to toggle)
portmap 6.0.0-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 320 kB
  • ctags: 87
  • sloc: ansic: 1,065; sh: 194; makefile: 96
file content (38 lines) | stat: -rw-r--r-- 611 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# config script for portmap

set -e

action=$1
version=$2
CONFFILE=/etc/default/portmap

# Only make debconf questions if 
# a) the CONFFILE exists 

if [ -e $CONFFILE ] ; then
	# Source debconf library.
	. $CONFFILE || true

	. /usr/share/debconf/confmodule

	# and b) has the expected content
	expected=1

	if [ "$OPTIONS" = "-i 127.0.0.1" ]; then
		db_set portmap/loopback true
		expected=0
        elif [ -z "$OPTIONS" ] ; then
		expected=0
		db_set portmap/loopback false
	fi

	if [ "$expected" -eq 0 ] ; then
		db_input medium portmap/loopback || true
	fi
	db_go || true
fi

#DEBHELPER#

exit 0