Re: debconf question
On 12/20/2010 03:43 PM, PICCA Frédéric-Emmanuel wrote:
> 1 #!/bin/sh
> 2 CONFIGFILE=/etc/tangorc
> 3 set -e
> 4 . /usr/share/debconf/confmodule
> 5
> 6 # Load config file, if it exists.
> 7 if [ -e $CONFIGFILE ]; then
> 8 . $CONFIGFILE || true
> 9
> 10 # Store values from config file into
> 11 # debconf db.
> 12 db_set tango-common/tango-host "$TANGO_HOST"
> 13 else
> 14 if db_fget tango-common/tango-host seen; then
> 15 if [ "$RET" = "false" ]; then
> 16 db_set tango-common/tango-host $(hostname -f)":10000"
> 17 fi
> 18 fi
> 19 fi
> 20
> 21
> 22 # what is the name of the tango host
> 23 db_input high tango-common/tango-host || true
> 24 db_go || true
Hi,
WIth your script here, there are cases where there's no db_set
tango-common/tango-host. That shouldn't happen. You should set it
unconditionally (eg: always)!
Thomas
Reply to: