3
PACKAGE=landscape-client
5
CONFIGFILE=/etc/landscape/client.conf
7
. /usr/share/debconf/confmodule
12
line=$(grep "^$var\s*=\s*" "$file" 2>/dev/null || true)
19
val=$(grep "^$var\s*=\s*" "$file" 2>/dev/null | tail -n1 | sed "s/^.*=\s*//")
26
line=$(var_in_file $var $file)
27
if [ -n "$line" ]; then
28
val=$(get_var_from_file $var $file)
29
# Store value from config file in debconf.
30
db_set $PACKAGE/$var $val
34
# Load config file, if it exists.
35
if [ -e $CONFIGFILE ]; then
36
# Config file is "ini" type, not shell, so we cannot source it
37
# If a setting is defined in the config file, update it in debconf
39
update_var "computer_title" "$CONFIGFILE"
40
update_var "account_name" "$CONFIGFILE"
41
update_var "registration_password" "$CONFIGFILE"
42
update_var "url" "$CONFIGFILE"
43
update_var "exchange_interval" "$CONFIGFILE"
44
update_var "urgent_exchange_interval" "$CONFIGFILE"
45
update_var "ping_url" "$CONFIGFILE"
46
update_var "ping_interval" "$CONFIGFILE"
47
update_var "http_proxy" "$CONFIGFILE"
48
update_var "https_proxy" "$CONFIGFILE"
49
update_var "tags" "$CONFIGFILE"
53
# Do debconf configuration
54
db_get $PACKAGE/register_system
55
if [ "$RET" = true ]; then
60
db_input "$priority" $PACKAGE/computer_title || true
61
db_input "$priority" $PACKAGE/account_name || true
62
db_input "$priority" $PACKAGE/registration_password || true