retitle 493092 dpkg-reconfigure creates or modifies
/etc/bacula/bacula-dir.conf.dist
thanks

On Thu, Jul 31, 2008 at 7:06 PM, John Goerzen <[EMAIL PROTECTED]> wrote:
> I cannot find any code in Bacula that would create a .dist file.  I have
> never heard of the Debian packages doing that.  How are you certain that
> the Debian package did, and that neither you or some other program did?

This is a fresh install. The directory /etc/bacula/ doesn't exist at
all before the install.
I just did a fresh install on my workstation. See the attached log
file for the hole process.

The second configuration file (.dist) was not created at all at the
install, but the install has failed as it was described in bug
#441995. So, I've commented the "USE ..." line and executed a
"dpkg-reconfigure bacula-director-mysql" which now will succeed.

In conclussion, the second configuration file bacula-dir.conf.dist is
a side effect for bug #441995 which I hope to be fixed for lenny. The
problem is that at reconfiguration it creates/modifies the
/etc/bacula/bacula-dir.conf.dist file instead of
/etc/bacula/bacula-dir.conf.

Thanks


----
inspire:~# ls -l /etc/bacula/
total 24
-rw-r----- 1 root bacula 8909 2008-07-31 19:19 bacula-dir.conf
-rw-r----- 1 root bacula 8909 2008-07-31 19:30 bacula-dir.conf.dist
drwxr-xr-x 2 root root    192 2008-07-31 19:19 scripts
inspire:~# date
Thu Jul 31 19:37:02 EEST 2008
inspire:~#
inspire:~#
inspire:~# dpkg-reconfigure -phigh bacula-director-mysql
Configuring bacula-director-mysql
---------------------------------

Since you are reconfiguring bacula-director-mysql, you may also want
to reinstall the database which it uses.

If you wish to re-install the database for bacula-director-mysql, you
should select this option.  If you do not wish to do so (if you are
reconfiguring the package for unrelated reasons), you should not
select this option.

Re-install database for bacula-director-mysql? no


dbconfig-common: writing config to
/etc/dbconfig-common/bacula-director-mysql.conf
Processing configuration ...Ok.
Stopping Bacula Director: bacula-dir.
Starting Bacula Director: bacula-dir.
inspire:~#
inspire:~#
inspire:~# ls -l /etc/bacula/
total 24
-rw-r----- 1 root bacula 8909 2008-07-31 19:19 bacula-dir.conf
-rw-r----- 1 root bacula 8909 2008-07-31 19:37 bacula-dir.conf.dist
drwxr-xr-x 2 root root    192 2008-07-31 19:19 scripts
inspire:~# ls -l /etc/bacula
ls: cannot access /etc/bacula: No such file or directory
inspire:~# 
inspire:~# 
inspire:~# apt-get install bacula-director-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bacula-common bacula-director-common mysql-server mysql-server-5.0
Suggested packages:
  bacula-doc tinyca
The following NEW packages will be installed:
  bacula-common bacula-director-common bacula-director-mysql mysql-server 
mysql-server-5.0
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 27.3MB/27.7MB of archives.
After this operation, 85.8MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://ftp.ro.debian.org sid/main bacula-director-common 2.4.1-1 [258kB]
Get:2 http://ftp.ro.debian.org sid/main bacula-director-mysql 2.4.1-1 [456kB]
Get:3 http://ftp.ro.debian.org sid/main mysql-server-5.0 5.0.51a-11 [26.5MB]
Get:4 http://ftp.ro.debian.org sid/main mysql-server 5.0.51a-11 [53.7kB]        
                                                           
Fetched 27.3MB in 25s (1058kB/s)                                                
                                                           
Preconfiguring packages ...
Selecting previously deselected package bacula-common.
(Reading database ... 196468 files and directories currently installed.)
Unpacking bacula-common (from .../bacula-common_2.4.1-1_i386.deb) ...
Adding user 'bacula'... Ok.
Processing triggers for man-db ...
Setting up bacula-common (2.4.1-1) ...
Selecting previously deselected package bacula-director-common.
(Reading database ... 196585 files and directories currently installed.)
Unpacking bacula-director-common (from 
.../bacula-director-common_2.4.1-1_i386.deb) ...
Selecting previously deselected package bacula-director-mysql.
Unpacking bacula-director-mysql (from 
.../bacula-director-mysql_2.4.1-1_i386.deb) ...
Selecting previously deselected package mysql-server-5.0.
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-11_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.51a-11_all.deb) ...
Processing triggers for man-db ...
Setting up bacula-director-common (2.4.1-1) ...
Setting up bacula-director-mysql (2.4.1-1) ...
Configuring bacula-director-mysql
---------------------------------

bacula-director-mysql must have a database installed and configured before it 
can be used.  If you like, this can be handled with 
dbconfig-common.

If you are an advanced database administrator and know that you want to perform 
this configuration manually, or if your database has already
been installed and configured, you should refuse this option.  Details on what 
needs to be done should most likely be provided in 
/usr/share/doc/bacula-director-mysql.

Otherwise, you should probably choose this option.

Configure database for bacula-director-mysql with dbconfig-common? yes


What is the password for the administrative account with which this package 
should create its MySQL database and user?

Password of your database's administrative user: 


Please provide a password for bacula-director-mysql to register with the 
database server.  If left blank, a random password will be 
generated for you.

MySQL application password for bacula-director-mysql: 


dbconfig-common: writing config to 
/etc/dbconfig-common/bacula-director-mysql.conf

Creating config file /etc/dbconfig-common/bacula-director-mysql.conf with new 
version
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered creating user:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)
Bacula Director
---------------

An error seems to have occurred while installing the database. If it's of any 
help, this was the error encountered:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)

At this point, you have the option to retry or abort the operation. If you 
choose "retry", you will be prompted with all the configuration 
questions once more and another attempt will be made at performing the 
operation. "retry (skip questions)" will immediately attempt the 
operation again, skipping all questions.  If you choose "abort", the operation 
will fail and you will need to downgrade, reinstall, 
reconfigure this package, or otherwise manually intervene to continue using it. 
 If you choose "ignore", the operation will continue, 
ignoring further errors from dbconfig-common.

  1. abort  2. retry  3. retry (skip questions)  4. ignore

Error installing database for bacula-director-mysql.  Retry? 4


dbconfig-common: bacula-director-mysql configure: ignoring errors from here 
forwards
populating database via sql...  done.
dbconfig-common: flushing administrative password
Processing configuration ...Ok.
Starting Bacula Director: bacula-dir.
Setting up mysql-server-5.0 (5.0.51a-11) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Setting up mysql-server (5.0.51a-11) ...
inspire:~# 
inspire:~# 
inspire:~# date
Thu Jul 31 19:20:24 EEST 2008
inspire:~# 
inspire:~# 
inspire:~# ls -l /etc/bacula
total 12
-rw-r----- 1 root bacula 8909 2008-07-31 19:19 bacula-dir.conf
drwxr-xr-x 2 root root    192 2008-07-31 19:19 scripts
inspire:~# 
inspire:~# 
inspire:~# pgrep -fl mysql
14299 /bin/sh /usr/bin/mysqld_safe
14435 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 
--socket=/var/run/mysqld/mysqld.sock
14436 logger -p daemon.err -t mysqld_safe -i -t mysqld
inspire:~# 
inspire:~# 
inspire:~# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.51a-11 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| mysql              | 
+--------------------+
2 rows in set (0.00 sec)

mysql> quit
Bye
inspire:~# 
inspire:~# 
inspire:~# 
inspire:~# vi 
/usr/share/dbconfig-common/data/bacula-director-mysql/install/mysql
inspire:~# 
inspire:~# 
inspire:~# ls -l /etc/bacula/
total 12
-rw-r----- 1 root bacula 8909 2008-07-31 19:19 bacula-dir.conf
drwxr-xr-x 2 root root    192 2008-07-31 19:19 scripts
inspire:~# 
inspire:~# 
inspire:~# dpkg-reconfigure bacula-director-mysql
Configuring bacula-director-mysql
---------------------------------

Since you are reconfiguring bacula-director-mysql, you may also want to 
reinstall the database which it uses.

If you wish to re-install the database for bacula-director-mysql, you should 
select this option.  If you do not wish to do so (if you are 
reconfiguring the package for unrelated reasons), you should not select this 
option.

Re-install database for bacula-director-mysql? yes


By default, bacula-director-mysql will be configured to use a MySQL server 
through a local unix socket (this provides the best performance).
However, if you would like to connect with a different method, or to a 
different server entirely, select an option from the choices below.

  1. unix socket  2. tcp/ip

Connection method for MySQL database of bacula-director-mysql: 2


Please provide the hostname of a remote MySQL server.

Note: you must have already arranged for the administrative account to be able 
to remotely create databases and grant privileges.

Host running the MySQL server for bacula-director-mysql: localhost


If the MySQL database on the remote host is running on a non-standard port, 
this is your opportunity to specify what it is.  To use the 
default port, leave this field blank.

Port number for the MySQL service: 


What is the name of the account with which this package should perform 
administrative actions?  This user is the one which is able to create
new database users.

For MySQL, this is almost always "root".  Note that this is NOT the same as the 
UNIX login 'root'.

Name of your database's administrative user: root


What is the password for the administrative account with which this package 
should create its MySQL database and user?

Password of your database's administrative user: 


Please provide a MySQL username for bacula-director-mysql to register with the 
database server.  A MySQL user is not necessarily the same as
a system login, especially if the database is on a remote server.

This is the user which will own the database, tables and other objects to be 
created by this installation.  This user will have complete 
freedom to insert, change or delete data in the database.

MySQL username for bacula-director-mysql: bacula


Please provide a name for the MySQL database to be used by 
bacula-director-mysql.

MySQL database name for bacula-director-mysql: bacula


dbconfig-common: writing config to 
/etc/dbconfig-common/bacula-director-mysql.conf
Replacing config file /etc/dbconfig-common/bacula-director-mysql.conf with new 
version
granting access to database bacula for [EMAIL PROTECTED]: success.
verifying access for [EMAIL PROTECTED]: success.
creating database bacula: success.
verifying database bacula exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password
Processing configuration ...Ok.
Stopping Bacula Director: bacula-dir.
Starting Bacula Director: bacula-dir.
inspire:~# 
inspire:~# 
inspire:~# ls -l /etc/bacula/
total 24
-rw-r----- 1 root bacula 8909 2008-07-31 19:19 bacula-dir.conf
-rw-r----- 1 root bacula 8909 2008-07-31 19:30 bacula-dir.conf.dist
drwxr-xr-x 2 root root    192 2008-07-31 19:19 scripts
inspire:~# 
inspire:~# 
inspire:~# 
inspire:~# date
Thu Jul 31 19:30:48 EEST 2008
inspire:~# 


Reply via email to