File: config

package info (click to toggle)
sn 0.3.8-9.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 916 kB
  • ctags: 852
  • sloc: ansic: 9,260; sh: 466; makefile: 208
file content (34 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (5)
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
#!/bin/sh -e

. /usr/share/debconf/confmodule

# Find good value for RUNFROM
if [ -f /etc/news/sn/debian-config ]
then
	. /etc/news/sn/debian-config
fi
if [ -z "$RUNFROM" ]
then
	db_get sn/runfrom
	RUNFROM=$RET
fi

if [ ! -z "$RUNFROM" ]
then
	db_set sn/runfrom "$RUNFROM"
fi

# Find good value for onlylocal
if grep -q "^#-- sn:" /etc/hosts.allow || grep -q "^#-- sn:" /etc/hosts.deny
then
	db_set sn/onlylocal true
else
	db_set sn/onlylocal false
fi

db_beginblock
db_input high sn/runfrom || true
db_input high sn/onlylocal || true
db_endblock
db_go