Public bug reported:
Hi there,
I am currently trying to preconfigure the debconf question of icinga-common for
an unattended installation. In detail I want to enable the
check_external_commands, therefore I did:
---------------------
# echo "icinga-common icinga/check_external_commands boolean true" |
debconf-set-selections
# export DEBIAN_FRONTEND=noninteractive
# apt-get install icinga-common
---------------------
Unfortunately the check_external_commands debconf value becomes overwritten and
so external commands are not activated.
I think I found the reason why the value becomes overwritten, in
icinga-common/DEBIAN/config there is the following code:
---------------------
if [ -e "$conffile" ]; then
check_external_commands="$(grep -E '^ *check_external_commands='
$conffile | sed -e 's|.*check_external_commands=||')"
# translate icinga option into debconf boolean
# (this is better than using a select in debconf with Choices-C,
# otherwise all translators would need to translate 'yes' and 'no').
case $check_external_commands in
0)
check_external_commands=false
;;
1)
check_external_commands=true
;;
esac
db_set icinga/check_external_commands $check_external_commands
db_input high icinga/check_external_commands || true
db_go || true
---------------------
In the last statements with db_set I think the debconf preconfigured value is
overwritten, as the config file is checked for "check_external_commands=0" and
not the value from deconf is taken.
As check_external_commands is a boolean it should be "true" or "false", so in
my opinion it should be possible to directly take the return value of
"db_input" and not parse the config file.
The fix with the icinga.cfg file and the case statement should then be not
necessary, as a result preconfiguration should work also.
System Information
---------------------
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
# uname -r
3.2.0-48-generic
Package Information
---------------------
icinga-common 1.9.1-1~ppa1~precise2
** Affects: icinga (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1197361
Title:
icinga-common debconf preconfiguration not working for
check_external_commands
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/icinga/+bug/1197361/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs