Sample Header Ad - 728x90

Not able to understand the way the debconf variables are initialized in the preseed configuration

1 vote
1 answer
811 views
Recently I inherited a lab but unfortunately the person who had setup has left the organization. I am finding trouble in understanding the pxe installation flow at the point where the debconf variables are initialized in the preseed configuration. part of preseed configuration:
### Account setup
d-i passwd/user-fullname string TEST User
d-i passwd/username string test
d-i passwd/user-password-crypted password xxxxxxxxxxxxxxxxxxxxxxxxxxx
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false

### Boot loader installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

### Finishing up the installation
d-i finish-install/reboot_in_progress note

### Custom stuff, update pre-late.sh if creating new variables
base-config	     test/http/server	    string 
base-config	     test/ubuntu/release	string 16.04 
base-config	     test/nfs/server		string 10.44.55.5
base-config	     test/nfs/config		string /export/vol01/ubuntu/config
base-config	     test/nis/domain		string ccd
base-config	     test/nis/server		string 10.44.55.100 10.44.55.101

#### Advanced options
d-i preseed/late_command   string wget http://10.44.55.5/ubuntu/config/pre-late.sh  -O /tmp/pre-late.sh; sh -x /tmp/pre-late.sh
d-i     preseed/run     string classes.sh
The above mentioned debconf variables test/ubuntu/release, test/nfs/server, test/nfs/config, test/nfs/domain and test/nis/server are being extracted and set the environment variables as shown below in the pre_late-sh script that is executed with preseed/late_command in the above preseed configuration.
#!/bin/sh

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

db_get test/ubuntu/release
export RELEASE="$RET"
db_get test/nfs/server
export NFS_SERVER="$RET"
db_get test/nfs/config
export NFS_CONFIG="$RET"
db_get test/nis/domain
export NIS_DOMAIN="$RET"
db_get test/nis/server
export NIS_SERVER="$RET"
I tried to google a lot about the way of initializing the debconf variables but not able to understand the way they are getting initialized here using base-config. Can someone help me to understand how is this being done?
Asked by Karthik (155 rep)
Aug 27, 2020, 08:06 AM
Last activity: Aug 27, 2020, 08:58 AM