Tzafrir Cohen wrote: > Hi > > I want to configure some packages in the base-config script using the > value of the two-letter country code (e.g: "us", "uk", "il"). > > The information is available in debconf. However the following command > seems t give an indication that the debconf database is locked when run > from a base-config script: > > country_answer=`echo GET debian-installer/country | debconf-communicate 2>/dev/null` > case "$country" in > 0*)country_lc=`echo $country_answer |sed -e 's/0 *//' | tr A-Z a-z`;; > *) > # debconf failed > logger "could not get country name from debconf using 'en'" > country_lc='en' > ;; > esac > > How can I read that value from debconf?
Source the debconf confmodule and use standard db_ commands to get the information. Or set Debconf: false in the .mnu file for your base-config script to force it to turn off debconf when running that script. -- see shy jo
signature.asc
Description: Digital signature