severity 387136 grave
thanks

hi again,

On Wed, Sep 13, 2006 at 12:20:42AM +0200, sean finney wrote:
> this is the intended behaviour, though the file should be the last
> argument (i think getopt is covering for this anyway, though).  what
> you're saying is:
> 
> - read the input file /etc/dbconfig-common/zabbix-server-mysql.conf
> - the input file is in sh format
> - use the variable named "foo" in this file as the default password
> 
> again, i'm pretty sure you want to be using dbconfig-generate-include.
> 
> > severity grave as this may break installation of other packages.
> 
> i'll be downgrading the bug for the moment until i'm convinced that it
> really is a bug.

i have just checked out your SVN tags/ repository and tried older
verions of dbconfig-common:

 1.8.10:
  kida:/home/abi# dbconfig-load-include -f sh -pmypass 
/etc/dbconfig-common/zabbix-server-mysql.conf 
  mypass='abi'

 (all other versions between .10 and .15 behave like that)

 1.8.15:
 kida:/home/abi# dbconfig-load-include -f sh -pmypass 
/etc/dbconfig-common/zabbix-server-mysql.conf 
 mypass='abi'

 (all other versions until .18 behave like that)i

 1.8.18:
 kida:/home/abi# dbconfig-load-include -f sh -pmypass 
/etc/dbconfig-common/zabbix-server-mysql.conf 
 dbc_dbpass=''

so it seems with 1.8.18 something broke, or the behavior of
dbconfig-load-include was changed. Diff between those two versions
attatched, im setting the severity to grave again. :)

bye,
    - michael
--- ../1.8.17/dbconfig-load-include     2006-09-13 12:42:13.000000000 +0200
+++ dbconfig-load-include       2006-09-13 12:42:17.000000000 +0200
@@ -9,7 +9,7 @@
 dbtype_varname="dbtype"
 
 # the version will always be < the package version
-VERSION="$Revision: 157 $"
+VERSION="$Revision: 276 $"
 
 version(){
        prog=`basename $0`
@@ -155,17 +155,26 @@
 
 case $format in
 sh)
-       . $inputfile
-       [ "$use_dbuser" ] && cat << EOF
-$dbuser_varname='$dbc_dbuser'
+       cat << EOF | sh
+. $inputfile
+use_dbuser="$use_dbuser";
+use_dbpass="$use_dbpass";
+use_dbname="$use_dbname";
+use_dbserver="$use_dbserver";
+use_dbport="$use_dbport";
+use_dbtype="$use_dbtype";
+
+[ "$use_dbuser" ] && cat << FOO
+dbc_dbuser='\$$dbuser_varname'
+FOO
+[ "$use_dbpass" ] && cat << FOO
+dbc_dbpass='\$$dbpass_varname'
+FOO
+       [ "$use_dbname" ] && echo "dbc_dbname='\$$dbname_varname'"
+       [ "$use_dbserver" ] && echo "dbc_dbserver='\$$dbserver_varname'"
+       [ "$use_dbport" ] && echo "dbc_dbport='\$$dbport_varname'"
+       [ "$use_dbtype" ] && echo "dbc_dbtype='\$$dbtype_varname'"
 EOF
-       [ "$use_dbpass" ] && cat << EOF
-$dbpass_varname='$dbc_dbpass'
-EOF
-       [ "$use_dbname" ] && echo "$dbname_varname='$dbc_dbname'"
-       [ "$use_dbserver" ] && echo "$dbserver_varname='$dbc_dbserver'"
-       [ "$use_dbport" ] && echo "$dbport_varname='$dbc_dbport'"
-       [ "$use_dbtype" ] && echo "$dbtype_varname='$dbc_dbtype'"
 ;;
 
 php)
@@ -196,7 +205,6 @@
                echo "dbc_dbport='\$$dbport_varname';\n";
        if(!empty(\$use_dbtype) && isset(\$$dbtype_varname)) 
                echo "dbc_dbtype='\$$dbtype_varname';\n";
-?>
 EOF
 ;;
 

Reply via email to