File: config

package info (click to toggle)
lynx-cur 2.8.7dev4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,748 kB
  • ctags: 10,819
  • sloc: ansic: 120,416; sh: 3,525; makefile: 917; perl: 884
file content (45 lines) | stat: -rw-r--r-- 914 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
38
39
40
41
42
43
44
45
#!/bin/sh -e

# Use debconf.
. /usr/share/debconf/confmodule

# Establish the preliminaries.
db_version
db_title 'Lynx-cur Configuration'

# Main
db_fget lynx-cur/defaulturl seen
if [ "$RET" = false ]; then
    if [ ! -z "`dnsdomainname`" ]; then
	db_set lynx-cur/defaulturl "http://www.`dnsdomainname`/"
    else
	db_reset lynx-cur/defaulturl
    fi
fi

ok=''
while [ -z "$ok" ]; do

# Ask the user what url should be displayed by default.
    db_input medium lynx-cur/defaulturl || true
    db_go || true

# Do some syntax checking on the url and see if it's ok.
    db_get lynx-cur/defaulturl

    case "$RET" in
	http:*|ftp:*|news:*|nntp:*|gopher:*|file:*|/*)
	ok=1
	;;
	*)
	# Set default flag so the user is prompted again.
	db_fset lynx-cur/defaulturl seen false
	;;
    esac
done

# Important note to a user
if [ -f /etc/lynx.cfg ]; then
    db_input high lynx-cur/etc_lynx.cfg || true
    db_go || true
fi