[pkg-bacula-commits] [bacula] 18/35: Install conffiles, don't mess with them

Carsten Leonhardt leo at moszumanska.debian.org
Wed Jul 20 10:21:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

leo pushed a commit to tag development/2011-04-29
in repository bacula.

commit 3e7ccf7901db2550cd899bef3af875a527c7a0cc
Author: Jan Hauke Rahm <jhr at debian.org>
Date:   Mon Apr 18 15:35:22 2011 +0200

    Install conffiles, don't mess with them
    
    Instead of pushing sed statements over files in /etc that an admin might
    have changed, just install them and let dpkg handle everything else,
    including removal.
    
    Currently this means that processes shouldn't be started after install
    since they don't have proper config. We might consider changing that by
    sourcing properly created random passwords but let's revisit that later.
    
    Closes: 585037
---
 debian/additions/postinst-common        | 31 --------------
 debian/bacula-common.postrm             |  1 -
 debian/bacula-console-qt.postinst       | 61 ----------------------------
 debian/bacula-console.install           |  1 +
 debian/bacula-console.postinst          | 63 -----------------------------
 debian/bacula-console.postrm            | 47 ----------------------
 debian/bacula-director-common.install   |  1 -
 debian/bacula-director-mysql.install    |  1 +
 debian/bacula-director-mysql.postinst   | 39 ------------------
 debian/bacula-director-mysql.postrm     |  3 --
 debian/bacula-director-pgsql.install    |  1 +
 debian/bacula-director-pgsql.postinst   | 47 ----------------------
 debian/bacula-director-pgsql.postrm     |  9 -----
 debian/bacula-director-sqlite3.install  |  1 +
 debian/bacula-director-sqlite3.postinst | 42 -------------------
 debian/bacula-director-sqlite3.postrm   |  2 -
 debian/bacula-fd.install                |  1 +
 debian/bacula-fd.postinst               | 71 ---------------------------------
 debian/bacula-fd.postrm                 | 42 -------------------
 debian/bacula-sd.install                |  1 +
 debian/bacula-sd.postinst               | 70 --------------------------------
 debian/bacula-sd.postrm                 | 41 -------------------
 debian/bacula-traymonitor.install       |  1 +
 debian/bacula-traymonitor.postinst      | 64 -----------------------------
 debian/bacula-traymonitor.postrm        | 46 ---------------------
 debian/patches/fix-default-config       | 30 +++++++-------
 debian/rules                            |  1 -
 27 files changed, 22 insertions(+), 696 deletions(-)

diff --git a/debian/additions/postinst-common b/debian/additions/postinst-common
deleted file mode 100644
index 52b43f9..0000000
--- a/debian/additions/postinst-common
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-DEFCONFIGDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CONFIG="bacula-dir.conf"
-TMPCONFIG=$DSTDIR/$CONFIG.dpkg-tmp
-
-if [ -f $TMPCONFIG ]; then
-    SOURCE=$TMPCONFIG
-else
-    SOURCE=$DEFCONFIGDIR/$CONFIG
-fi
-
-if [ ! -f $DSTDIR/$CONFIG ]; then
-    TARGET=$DSTDIR/$CONFIG
-else
-    TARGET=$DSTDIR/$CONFIG.dist
-fi
-
-# Final config fix
-sed -e "s/@debian_hostname@/`hostname`/" < $SOURCE > $TARGET
-
-# get rid of now unnecessary file
-rm -f $TMPCONFIG
-
-# Harden permissions, so that passwords can not be looked at
-# Fixed by Philipp M Hahn
-chown root:bacula $TARGET
-chmod 640 $TARGET
-
-exit 0
diff --git a/debian/bacula-common.postrm b/debian/bacula-common.postrm
index 085a6ca..ac9e3e2 100644
--- a/debian/bacula-common.postrm
+++ b/debian/bacula-common.postrm
@@ -22,7 +22,6 @@ case "$1" in
 	purge)
 		userdel bacula 2>&1 > /dev/null || true
 		rm -rf /var/run/bacula
-		rm -rf /etc/bacula
 		rm -rf /var/log/bacula
 		rm -rf /var/lib/bacula
 	;;
diff --git a/debian/bacula-console-qt.postinst b/debian/bacula-console-qt.postinst
deleted file mode 100644
index 2b99d97..0000000
--- a/debian/bacula-console-qt.postinst
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/sh
-# postinst script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-SRCDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CFGFILE="bat.conf"
-
-case "$1" in
-    configure)
-
-	if [ ! -f $DSTDIR/$CFGFILE ]; then
-		TARGET=$DSTDIR/$CFGFILE
-	else
-		TARGET=$DSTDIR/$CFGFILE.dist
-	fi
-
-	# bconsole & wx-console use the same config file ;)
-	sed -e "s~@debian_hostname@~localhost~" < $SRCDIR/$CFGFILE > $TARGET
-
-	chown root:bacula $TARGET
-	chmod 640 $TARGET
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-console.install b/debian/bacula-console.install
index 2a60dc7..30f5b06 100644
--- a/debian/bacula-console.install
+++ b/debian/bacula-console.install
@@ -1 +1,2 @@
 usr/sbin/bconsole
+etc/bacula/bconsole.conf
diff --git a/debian/bacula-console.postinst b/debian/bacula-console.postinst
deleted file mode 100644
index bb05260..0000000
--- a/debian/bacula-console.postinst
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# postinst script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-SRCDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CONFIG="bconsole.conf"
-
-CONSOLE=/usr/sbin/bacula-console
-
-case "$1" in
-    configure)
-	if [ ! -f $DSTDIR/$CONFIG ]; then
-		TARGET=$DSTDIR/$CONFIG
-	else
-		TARGET=$DSTDIR/$CONFIG.dist
-	fi
-
-	sed -e "s~@debian_hostname@~localhost~" < $SRCDIR/$CONFIG > $TARGET
-
-	chown root:bacula $TARGET
-	chmod 640 $TARGET
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff --git a/debian/bacula-console.postrm b/debian/bacula-console.postrm
deleted file mode 100644
index c81055e..0000000
--- a/debian/bacula-console.postrm
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-CONSOLE=/usr/sbin/bacula-console
-CFGDIR=/etc/bacula
-CFGFILE="bconsole.conf"
-
-case "$1" in
-	purge)
-		rm -f $CFGDIR/$CFGFILE.*
-	;;
-
-	remove)
-	;;
-
-	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-
-        ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-common.install b/debian/bacula-director-common.install
index eaaa134..cc48548 100644
--- a/debian/bacula-director-common.install
+++ b/debian/bacula-director-common.install
@@ -1,5 +1,4 @@
 etc/bacula/scripts/query.sql
 usr/sbin/bwild
 usr/sbin/bregex
-debian/additions/postinst-common	usr/share/bacula-director
 debian/default/bacula-dir		etc/default
diff --git a/debian/bacula-director-mysql.install b/debian/bacula-director-mysql.install
index 83fd407..5ce3538 100644
--- a/debian/bacula-director-mysql.install
+++ b/debian/bacula-director-mysql.install
@@ -4,3 +4,4 @@ etc/bacula/scripts/*catalog_backup
 etc/bacula/scripts/*catalog_backup.pl
 usr/sbin/bacula-dir
 usr/sbin/dbcheck
+etc/bacula/bacula-dir.conf
diff --git a/debian/bacula-director-mysql.postinst b/debian/bacula-director-mysql.postinst
index 9c9631f..37965b4 100644
--- a/debian/bacula-director-mysql.postinst
+++ b/debian/bacula-director-mysql.postinst
@@ -35,50 +35,11 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
   dbc_go bacula-director-mysql $@
 fi
 
-LOGDIR="/var/log/bacula"
-POSTINST_COMMON="/usr/share/bacula-director/postinst-common"
-DEFCONFIG="/usr/share/bacula-common/defconfig"
-CFGFILE="/etc/bacula/bacula-dir.conf"
-
 if [ -n "$2" ]; then
 	/etc/init.d/bacula-director stop || true
 	sleep 1
 fi
 
-. /usr/share/bacula-common/common-functions
-readOrCreatePasswords
-
-case "$1" in
-configure)
-
-	echo -n "Processing configuration..."
-        . /etc/dbconfig-common/bacula-director-mysql.conf
-	TARGET=$CFGFILE.dpkg-tmp
-        # FIXME: should this tweak make_catalog_backup like bacula-director-pgsql.postinst does?
-	sed -e "s/dbname = \"XXX_DBNAME_XXX\";/dbname = \"$dbc_dbname\"; DB Address = \"$dbc_dbserver\";/" \
-	-e "s~/XXX_DBNAME_XXX~/$dbc_dbname~" \
-        -e "s/XXX_DBUSER_XXX/$dbc_dbuser/" -e "s/XXX_DBPASSWORD_XXX/$dbc_dbpass/" \
-	-e s~XXX_DIRPASSWORD_XXX~$DIRPASSWD~ \
-	-e s~XXX_MONDIRPASSWORD_XXX~$DIRMPASSWD~ \
-	-e s~XXX_SDPASSWORD_XXX~$SDPASSWD~ \
-	-e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
-		$DEFCONFIG/bacula-dir.conf > $TARGET
-
-	/bin/bash $POSTINST_COMMON
-
-	echo "Ok."
-	;;
-
-abort-upgrade|abort-remove|abort-deconfigure)
-
-	;;
-
-*)
-	echo "postinst called with unknown argument \`$1'" >&2
-	exit 1
-	;;
-esac
-
 # Do start daemon
 db_stop
 
diff --git a/debian/bacula-director-mysql.postrm b/debian/bacula-director-mysql.postrm
index 17b8cfc..0fde970 100644
--- a/debian/bacula-director-mysql.postrm
+++ b/debian/bacula-director-mysql.postrm
@@ -33,11 +33,8 @@ set -e
 # the debian-policy package
 
 
-CONFFILE=/etc/bacula/bacula-dir.conf
-
 case "$1" in
 	purge)
-		rm -f $CONFFILE $CONFFILE.dist
 		# Drop Bacula's user privileges? Can't do	
 		# Potentially, drop DB ... Can't do?
 		db_purge
diff --git a/debian/bacula-director-pgsql.install b/debian/bacula-director-pgsql.install
index 0557e23..9249ae0 100644
--- a/debian/bacula-director-pgsql.install
+++ b/debian/bacula-director-pgsql.install
@@ -6,3 +6,4 @@ etc/bacula/scripts/*catalog_backup.pl
 usr/sbin/bacula-dir
 usr/sbin/dbcheck
 debian/additions/pgsql	usr/share/dbconfig-common/data/bacula-director-pgsql/install-dbadmin
+etc/bacula/bacula-dir.conf
diff --git a/debian/bacula-director-pgsql.postinst b/debian/bacula-director-pgsql.postinst
index 7ae9fc7..0ad9a4f 100644
--- a/debian/bacula-director-pgsql.postinst
+++ b/debian/bacula-director-pgsql.postinst
@@ -37,58 +37,11 @@ if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
   dbc_go bacula-director-pgsql $@
 fi
 
-LOGDIR="/var/log/bacula"
-POSTINST_COMMON="/usr/share/bacula-director/postinst-common"
-DEFCONFIG="/usr/share/bacula-common/defconfig"
-CFGFILE="/etc/bacula/bacula-dir.conf"
-CATALOG=bacula
-PGSQL=/usr/bin/psql
-GRANT_SQL_PRIVS="/usr/share/bacula-director/grant_pgsql_privileges"
-AUTHFILE=`getent passwd bacula | cut -d ':' -f 6`/.pgpass
-
 if [ -n "$2" ]; then
 	/etc/init.d/bacula-director stop || true
 	sleep 1
 fi
 
-. /usr/share/bacula-common/common-functions
-readOrCreatePasswords
-
-case "$1" in
-configure)
-	
-	echo -n "Processing configuration..."
-        . /etc/dbconfig-common/bacula-director-pgsql.conf
-	TARGET=$CFGFILE.dpkg-tmp
-
-        if [ "$dbc_install" = "true" ] ; then
-            sed -e "s/make_catalog_backup bacula bacula/make_catalog_backup -h '$dbc_dbserver' -U $dbc_dbuser/" \
-        -e "s/dbname = \"XXX_DBNAME_XXX\";/dbname = \"$dbc_dbname\"; DB Address = \"$dbc_dbserver\";/" \
-	-e "s~/XXX_DBNAME_XXX~/$dbc_dbname~" \
-        -e "s/XXX_DBUSER_XXX/$dbc_dbuser/" -e "s/XXX_DBPASSWORD_XXX/$dbc_dbpass/" \
-        -e s~XXX_DIRPASSWORD_XXX~$DIRPASSWD~ \
-        -e s~XXX_MONDIRPASSWORD_XXX~$DIRMPASSWD~ \
-        -e s~XXX_SDPASSWORD_XXX~$SDPASSWD~ \
-        -e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
-                $DEFCONFIG/bacula-dir.conf > $TARGET
-        fi
-
-	/bin/sh $POSTINST_COMMON
-	echo "Ok."
-	;;
-
-abort-upgrade|abort-remove|abort-deconfigure)
-
-	;;
-
-*)
-	echo "postinst called with unknown argument \`$1'" >&2
-	exit 1
-	;;
-esac
-
-
-
 # Do start daemon
 db_stop
 
diff --git a/debian/bacula-director-pgsql.postrm b/debian/bacula-director-pgsql.postrm
index fe0d556..6f20fca 100644
--- a/debian/bacula-director-pgsql.postrm
+++ b/debian/bacula-director-pgsql.postrm
@@ -31,17 +31,8 @@ set -e
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
-
-CATALOG=bacula
-PGSQL=/usr/bin/psql
-CONFFILE=/etc/bacula/bacula-dir.conf
-AUTHFILE=`getent passwd bacula | cut -d ':' -f 6`/.pgpass
-
-
 case "$1" in
 	purge)
-		rm -f $CONFFILE $CONFFILE.dist $AUTHFILE
-
 		db_purge
 	;;
 
diff --git a/debian/bacula-director-sqlite3.install b/debian/bacula-director-sqlite3.install
index 6d6e9f0..31ebb5e 100644
--- a/debian/bacula-director-sqlite3.install
+++ b/debian/bacula-director-sqlite3.install
@@ -4,3 +4,4 @@ etc/bacula/scripts/*catalog_backup
 etc/bacula/scripts/*catalog_backup.pl
 usr/sbin/bacula-dir
 usr/sbin/dbcheck
+etc/bacula/bacula-dir.conf
diff --git a/debian/bacula-director-sqlite3.postinst b/debian/bacula-director-sqlite3.postinst
index 4a0c951..498dc98 100644
--- a/debian/bacula-director-sqlite3.postinst
+++ b/debian/bacula-director-sqlite3.postinst
@@ -43,48 +43,6 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then
   dbc_go bacula-director-sqlite3 $@
 fi
 
-LOGDIR="/var/log/bacula"
-POSTINST_COMMON="/usr/share/bacula-director/postinst-common"
-DEFCONFIG="/usr/share/bacula-common/defconfig"
-CFGFILE="/etc/bacula/bacula-dir.conf"
-
-. /usr/share/bacula-common/common-functions
-readOrCreatePasswords
-
-case "$1" in
-configure)
-
-	echo -n "Processing configuration..."
-        . /etc/dbconfig-common/bacula-director-sqlite3.conf
-	TARGET=$CFGFILE.dpkg-tmp
-        # FIXME: should this tweak make_catalog_backup like bacula-director-pgsql.postinst does?
-        BACULADBNAME=`echo "$dbc_dbname" | sed 's/.db$//'`
-
-	sed -e s~XXX_DIRPASSWORD_XXX~$DIRPASSWD~ \
-	        -e s~XXX_MONDIRPASSWORD_XXX~$DIRMPASSWD~ \
-	        -e s~XXX_SDPASSWORD_XXX~$SDPASSWD~ \
-	        -e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
-                -e "s~/XXX_DBNAME_XXX~/$BACULADBNAME~" \
-		-e "s~\"XXX_DBNAME_XXX~\"$BACULADBNAME~" \
-		-e s~XXX_DBUSER_XXX~~ \
-		-e s~XXX_DBPASSWORD_XXX~~ \
-			$DEFCONFIG/bacula-dir.conf > $TARGET
-        
-	/bin/bash $POSTINST_COMMON
-
-	echo "Ok."
-	;;
-
-abort-upgrade|abort-remove|abort-deconfigure)
-
-	;;
-
-*)
-	echo "postinst called with unknown argument \`$1'" >&2
-	exit 1
-	;;
-esac
-
 # Do start daemon
 db_stop
 
diff --git a/debian/bacula-director-sqlite3.postrm b/debian/bacula-director-sqlite3.postrm
index bd21108..45bd528 100644
--- a/debian/bacula-director-sqlite3.postrm
+++ b/debian/bacula-director-sqlite3.postrm
@@ -22,10 +22,8 @@ set -e
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
-CONFFILE=/etc/bacula/bacula-dir.conf
 case "$1" in
 	purge)
-		rm -f $CONFFILE $CONFFILE.dist
 		db_purge
 	;;
 	remove)
diff --git a/debian/bacula-fd.install b/debian/bacula-fd.install
index cf8404e..a58b459 100644
--- a/debian/bacula-fd.install
+++ b/debian/bacula-fd.install
@@ -1,3 +1,4 @@
 usr/sbin/bacula-fd
 usr/lib/bacula/bpipe-fd.so
+etc/bacula/bacula-fd.conf
 debian/default/bacula-fd		etc/default
diff --git a/debian/bacula-fd.postinst b/debian/bacula-fd.postinst
deleted file mode 100644
index 45f0175..0000000
--- a/debian/bacula-fd.postinst
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/bash
-# postinst script for bacula-fd
-#
-
-. /usr/share/debconf/confmodule
-db_version 2.0
- 
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-SRCDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CONFIG="bacula-fd.conf"
-
-. /usr/share/bacula-common/common-functions
-readOrCreatePasswords
-
-case "$1" in
-    configure)
-
-	if [ ! -f $DSTDIR/$CONFIG ]; then
-		TARGET=$DSTDIR/$CONFIG
-	else
-		TARGET=$DSTDIR/$CONFIG.dist
-	fi
-
-	sed -e s~@debian_hostname@~`hostname`~ \
-	-e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
-	-e s~XXX_MONFDPASSWORD_XXX~$FDMPASSWD~ < $SRCDIR/$CONFIG > $TARGET
-	
-
-	# Harden permissions, so that passwords can not be looked at
-	chown root:root $TARGET
-	chmod 640 $TARGET
-    ;; 
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff --git a/debian/bacula-fd.postrm b/debian/bacula-fd.postrm
deleted file mode 100644
index 1996dd6..0000000
--- a/debian/bacula-fd.postrm
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-	purge)
-		rm -f /etc/bacula/bacula-fd.*
-	;;
-
-	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-
-
-        ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-sd.install b/debian/bacula-sd.install
index 8bd2078..106105a 100644
--- a/debian/bacula-sd.install
+++ b/debian/bacula-sd.install
@@ -5,4 +5,5 @@ etc/bacula/scripts/mtx-changer
 etc/bacula/scripts/mtx-changer.conf
 etc/bacula/scripts/disk-changer
 etc/bacula/scripts/dvd-handler
+etc/bacula/bacula-sd.conf
 debian/default/bacula-sd		etc/default
diff --git a/debian/bacula-sd.postinst b/debian/bacula-sd.postinst
deleted file mode 100644
index ed1212f..0000000
--- a/debian/bacula-sd.postinst
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/bash
-# postinst script for bacula-sd
-#
-
-. /usr/share/debconf/confmodule
-db_version 2.0
- 
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-SRCDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CONFIG="bacula-sd.conf"
-
-. /usr/share/bacula-common/common-functions
-readOrCreatePasswords
-
-case "$1" in
-    configure)
- 
-	if [ ! -f $DSTDIR/$CONFIG ]; then
-		TARGET=$DSTDIR/$CONFIG
-	else
-		TARGET=$DSTDIR/$CONFIG.dist
-	fi
-
-	sed -e s~@debian_hostname@~`hostname`~ \
-	-e s~XXX_SDPASSWORD_XXX~$SDPASSWD~ \
-	-e s~XXX_MONSDPASSWORD_XXX~$SDMPASSWD~ < $SRCDIR/$CONFIG > $TARGET
-	
-	# Harden permissions, so that passwords can not be looked at
-	chown bacula:bacula $TARGET
-	chmod 640 $TARGET
-   ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff --git a/debian/bacula-sd.postrm b/debian/bacula-sd.postrm
deleted file mode 100644
index 3ea05a9..0000000
--- a/debian/bacula-sd.postrm
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-	purge)
-		rm -f /etc/bacula/bacula-sd.*
-	;;
-
-	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-
-        ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-traymonitor.install b/debian/bacula-traymonitor.install
index 4da6816..b2eb115 100644
--- a/debian/bacula-traymonitor.install
+++ b/debian/bacula-traymonitor.install
@@ -1,2 +1,3 @@
 usr/sbin/bacula-tray-monitor	usr/bin
 src/tray-monitor/generic.xpm usr/share/pixmaps/bacula-traymonitor.xpm
+etc/bacula/tray-monitor.conf
diff --git a/debian/bacula-traymonitor.postinst b/debian/bacula-traymonitor.postinst
deleted file mode 100644
index d5cfec6..0000000
--- a/debian/bacula-traymonitor.postinst
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-# postinst script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-SRCDIR="/usr/share/bacula-common/defconfig"
-DSTDIR="/etc/bacula"
-CONFIG="tray-monitor.conf"
-
-CONSOLE=/usr/sbin/bacula-console
-
-case "$1" in
-    configure)
-
-        if [ ! -f $DSTDIR/$CONFIG ]; then
-            TARGET=$DSTDIR/$CONFIG
-        else
-            TARGET=$DSTDIR/$CONFIG.dist
-        fi
-
-        sed -e "s~@debian_hostname@~localhost~" < $SRCDIR/$CONFIG > $TARGET
-        chown root:bacula $TARGET
-        chmod 640 $TARGET
-
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff --git a/debian/bacula-traymonitor.postrm b/debian/bacula-traymonitor.postrm
deleted file mode 100644
index 1486980..0000000
--- a/debian/bacula-traymonitor.postrm
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-CFGDIR=/etc/bacula
-CFGFILE="tray-monitor.conf"
-
-case "$1" in
-    purge)
-        rm -f $CFGDIR/$CFGFILE.*
-    ;;
-
-    remove)
-    ;;
-
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/patches/fix-default-config b/debian/patches/fix-default-config
index df0f6ad..33fdca9 100644
--- a/debian/patches/fix-default-config
+++ b/debian/patches/fix-default-config
@@ -5,7 +5,7 @@
  
  Director {                            # define myself
 -  Name = @basename at -dir
-+  Name = @debian_hostname at -dir
++  Name = localhost-dir
    DIRport = @dir_port@                # where we listen for UA connections
    QueryFile = "@scriptdir@/query.sql"
    WorkingDirectory = "@working_dir@"
@@ -21,7 +21,7 @@
    Type = Backup
    Level = Incremental
 -  Client = @basename at -fd 
-+  Client = @debian_hostname at -fd
++  Client = localhost-fd
    FileSet = "Full Set"
    Schedule = "WeeklyCycle"
    Storage = File
@@ -30,7 +30,7 @@
  #Job {
  #  Name = "BackupClient2"
 -#  Client = @basename at 2-fd
-+#  Client = @debian_hostname at 2-fd
++#  Client = localhost2-fd
  #  JobDefs = "DefaultJob"
  #}
  
@@ -39,7 +39,7 @@
    Name = "RestoreFiles"
    Type = Restore
 -  Client=@basename at -fd                 
-+  Client=@debian_hostname at -fd
++  Client=localhost-fd
    FileSet="Full Set"                  
    Storage = File                      
    Pool = Default
@@ -48,7 +48,7 @@
  # Client (File Services) to backup
  Client {
 -  Name = @basename at -fd
-+  Name = @debian_hostname at -fd
++  Name = localhost-fd
    Address = @hostname@
    FDPort = @fd_port@
    Catalog = MyCatalog
@@ -57,7 +57,7 @@
  #
  #Client {
 -#  Name = @basename at 2-fd                
-+#  Name = @debian_hostname at 2-fd
++#  Name = localhost2-fd
  #  Address = @hostname at 2
  #  FDPort = @fd_port@
  #  Catalog = MyCatalog
@@ -86,7 +86,7 @@
  #
  Console {
 -  Name = @basename at -mon
-+  Name = @debian_hostname at -mon
++  Name = localhost-mon
    Password = "@mon_dir_password@"
    CommandACL = status, .status
  }
@@ -97,7 +97,7 @@
  #
  Director {
 -  Name = @basename at -dir
-+  Name = @debian_hostname at -dir
++  Name = localhost-dir
    Password = "@fd_password@"
  }
  
@@ -106,7 +106,7 @@
  #
  Director {
 -  Name = @basename at -mon
-+  Name = @debian_hostname at -mon
++  Name = localhost-mon
    Password = "@mon_fd_password@"
    Monitor = yes
  }
@@ -115,7 +115,7 @@
  #
  FileDaemon {                          # this is me
 -  Name = @basename at -fd
-+  Name = @debian_hostname at -fd
++  Name = localhost-fd
    FDport = @fd_port@                  # where we listen for the director
    WorkingDirectory = @working_dir@
    Pid Directory = @piddir@
@@ -127,7 +127,7 @@
  Messages {
    Name = Standard
 -  director = @basename at -dir = all, !skipped, !restored
-+  director = @debian_hostname at -dir = all, !skipped, !restored
++  director = localhost-dir = all, !skipped, !restored
  }
 --- a/src/stored/bacula-sd.conf.in
 +++ b/src/stored/bacula-sd.conf.in
@@ -136,7 +136,7 @@
  
  Storage {                             # definition of myself
 -  Name = @basename at -sd
-+  Name = @debian_hostname at -sd
++  Name = localhost-sd
    SDPort = @sd_port@                  # Director's port      
    WorkingDirectory = "@working_dir@"
    Pid Directory = "@piddir@"
@@ -149,7 +149,7 @@
  #
  Director {
 -  Name = @basename at -dir
-+  Name = @debian_hostname at -dir
++  Name = localhost-dir
    Password = "@sd_password@"
  }
  
@@ -158,7 +158,7 @@
  #
  Director {
 -  Name = @basename at -mon
-+  Name = @debian_hostname at -mon
++  Name = localhost-mon
    Password = "@mon_sd_password@"
    Monitor = yes
  }
@@ -167,7 +167,7 @@
  Messages {
    Name = Standard
 -  director = @basename at -dir = all
-+  director = @debian_hostname at -dir = all
++  director = localhost-dir = all
  }
 --- a/src/stored/stored.conf.in
 +++ b/src/stored/stored.conf.in
diff --git a/debian/rules b/debian/rules
index 2c0e51a..ec6b118 100755
--- a/debian/rules
+++ b/debian/rules
@@ -116,7 +116,6 @@ override_dh_installinit:
 	dh_installinit --name=bacula-director -pbacula-director-sqlite3 --no-start -- defaults 92 8
 
 override_dh_install:
-	chmod 755 debian/additions/postinst-common
 	chmod 755 debian/scripts/extract_here
 	dh_install
 	chmod 755 debian/bacula-common/usr/lib/bacula/btraceback

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git



More information about the pkg-bacula-commits mailing list