The postinst-common script will remove the original configuration file if no new temporary configuration file was generated.
Here's a possible fix, still to be tested:
diff -u bacula-2.4.2/debian/additions/postinst-common
bacula-2.4.2/debian/additions/postinst-common
--- bacula-2.4.2/debian/additions/postinst-common
+++ bacula-2.4.2/debian/additions/postinst-common
@@ -3,17 +3,18 @@
DEFCONFIGDIR="/usr/share/bacula-common/defconfig"
DSTDIR="/etc/bacula"
CONFIG="bacula-dir.conf"
+CONFIGTMP=$DSTDIR/$CONFIG.dpkg-tmp
-if [ -f $DSTDIR/$CONFIG.dpkg-tmp ]; then
- SOURCE=$DSTDIR/$CONFIG.dpkg-tmp
-else
- SOURCE=$DSTDIR/$CONFIG
-fi
-
-if [ -f $DSTDIR/$CONFIG -a ! -f $SOURCE ]; then
- echo "Target $DSTDIR/$CONFIG already exists and $SOURCE doesn't"
+if [ -f $DSTDIR/$CONFIG -a ! -f $CONFIGTMP ]; then
+ echo "Target $DSTDIR/$CONFIG already exists and $CONFIGTMP doesn't"
echo "Not modifying target."
else
+ if [ -f $CONFIGTMP ]; then
+ SOURCE=$CONFIGTMP
+ else
+ SOURCE=$DSTDIR/$CONFIG
+ fi
+
if [ ! -f $DSTDIR/$CONFIG ]; then
TARGET=$DSTDIR/$CONFIG
else
@@ -24,7 +25,7 @@
sed -e "s/@hostname@/`hostname`/" < $SOURCE > $TARGET
# get rid of now unnecessary file
- rm -f $SOURCE
+ rm -f $CONFIGTMP
# Harden permissions, so that passwords can not be looked at
# Fixed by Philipp M Hahn
chown root:bacula $TARGET
--- END ---
I will make an NMU once I can test this.
Ben.
signature.asc
Description: This is a digitally signed message part

