File: config

package info (click to toggle)
portmap 5-26
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 264 kB
  • ctags: 111
  • sloc: ansic: 1,061; sh: 178; makefile: 100
file content (37 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (2)
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
#!/bin/sh -e
# config script for portmap

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