File: config

package info (click to toggle)
sn 0.3.4a-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 784 kB
  • ctags: 826
  • sloc: ansic: 9,023; sh: 339; makefile: 208
file content (34 lines) | stat: -rw-r--r-- 550 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
#!/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 yes
else
	db_set sn/onlylocal no
fi

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