File: config

package info (click to toggle)
tipcutils 1.0.4-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 220 kB
  • ctags: 211
  • sloc: ansic: 1,588; sh: 251; makefile: 59
file content (41 lines) | stat: -rw-r--r-- 1,306 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
#!/bin/sh -e

CONFIGFILE=/etc/default/tipcutils

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

# Load config file, if it exists.
if [ -e $CONFIGFILE ]; then
	. $CONFIGFILE || true
# Store values from config file into debconf db.
	db_set tipcutils/configure         "$TIPC_CONFIGURED"
	db_set tipcutils/address           "$TIPC_ADDR"
	db_set tipcutils/netid             "$TIPC_NETID"
	# be backwards compatible with "en-/disable" value which was in place until 1.0.4-3
	if [ "$TIPC_REMOTE_MANAGEMENT" = "enable" ]; then
		TIPC_REMOTE_MANAGEMENT="true"
	elif [ "$TIPC_REMOTE_MANAGEMENT" = "disable" ]; then
		TIPC_REMOTE_MANAGEMENT="false"
	fi
	db_set tipcutils/remote_management "$TIPC_REMOTE_MANAGEMENT"
	db_set tipcutils/default_ndd       "$TIPC_DEFAULT_NDD"
	db_set tipcutils/interfaces        "$TIPC_INTERFACES"
	db_set tipcutils/script_verbosity  "$TIPC_VERBOSITY"
fi

db_input high tipcutils/configure || true
db_go

db_get tipcutils/configure
if [ "$RET" = "true" ]; then
	# Tipc will be configured
	db_input high tipcutils/address || true
	db_input high tipcutils/netid  || true
	db_input high tipcutils/interfaces  || true
	db_input medium tipcutils/remote_management  || true
	db_input medium tipcutils/default_ndd  || true
	db_input low tipcutils/script_verbosity || true
	db_go
fi