File: config

package info (click to toggle)
post-faq 0.10-13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 172 kB
  • ctags: 26
  • sloc: perl: 313; makefile: 43; sh: 26; awk: 7
file content (31 lines) | stat: -rw-r--r-- 851 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
#! /bin/sh -e

# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0

db_beginblock

# Note this oode block is copied from slrn:
if [ ! -s /etc/news/server ]; then
	# No news server file currently exists (or it's empty).
	db_get shared/news/server
	SERVER="$RET"
	# If there is no server set, try to guess a good value.
	if [ -z "$SERVER" ]; then
		NETNAME="`hostname -d`"
		if [ ! -z "$NETNAME" ]; then
			db_set shared/news/server "news.$NETNAME"
		fi
	fi
	db_input medium shared/news/server || true
else
	# Reconfiguring the package, or a news server file already exists.
	# Still ask the question, though it may or may not be seen. Just
	# use the first line of the file now as the default answer.
	db_set shared/news/server "`head -1 /etc/news/server`"
	db_input medium shared/news/server || true
fi

db_endblock
db_go || true