3
PACKAGE=landscape-client
5
CONFIGFILE=/etc/landscape/client.conf
7
. /usr/share/debconf/confmodule
9
# This function also exists in the postinst, please keep them in sync
13
val=$(grep "^$var\s*=\s*" "$file" 2>/dev/null | tail -n1 | sed "s/^.*=\s*//")
17
# Load config file, if it exists.
18
if [ -e $CONFIGFILE ]; then
19
# Config file is "ini" type, not shell, so we cannot source it
20
COMPUTER_TITLE=$(get_var_from_file "computer_title" "$CONFIGFILE")
21
ACCOUNT_NAME=$(get_var_from_file "account_name" "$CONFIGFILE")
22
REGISTRATION_PASSWORD=$(get_var_from_file "registration_password" "$CONFIGFILE")
24
# Store values from config file into
27
db_set $PACKAGE/computer_title $COMPUTER_TITLE
28
db_set $PACKAGE/account_name $ACCOUNT_NAME
29
db_set $PACKAGE/registration_password $REGISTRATION_PASSWORD
34
db_input medium $PACKAGE/sysinfo || true
35
db_input medium $PACKAGE/computer_title || true
36
db_input medium $PACKAGE/account_name || true
37
db_input medium $PACKAGE/registration_password || true