[pkg-bacula-commits] [bacula] 19/35: Decruft maintainer scripts

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 43b1ffa03238c0007348b4af56b49b4ef1ef2ccb
Author: Jan Hauke Rahm <jhr at debian.org>
Date:   Mon Apr 18 15:40:42 2011 +0200

    Decruft maintainer scripts
---
 debian/bacula-common.postinst           | 41 +-------------------
 debian/bacula-common.postrm             | 31 ---------------
 debian/bacula-common.preinst            | 68 +--------------------------------
 debian/bacula-director-common.postinst  | 50 +-----------------------
 debian/bacula-director-common.postrm    | 40 -------------------
 debian/bacula-director-mysql.config     | 18 +--------
 debian/bacula-director-mysql.postinst   | 25 +-----------
 debian/bacula-director-mysql.postrm     | 49 +-----------------------
 debian/bacula-director-mysql.prerm      | 29 +-------------
 debian/bacula-director-pgsql.config     | 22 +----------
 debian/bacula-director-pgsql.postinst   | 25 +-----------
 debian/bacula-director-pgsql.postrm     | 44 +--------------------
 debian/bacula-director-pgsql.prerm      | 26 -------------
 debian/bacula-director-sqlite3.config   | 18 +--------
 debian/bacula-director-sqlite3.postinst | 26 +------------
 debian/bacula-director-sqlite3.postrm   | 44 +++------------------
 debian/bacula-director-sqlite3.prerm    | 30 ---------------
 debian/bacula-fd.prerm                  | 38 ------------------
 debian/bacula-sd.prerm                  | 38 ------------------
 19 files changed, 19 insertions(+), 643 deletions(-)

diff --git a/debian/bacula-common.postinst b/debian/bacula-common.postinst
index 4e457e4..73c09c6 100644
--- a/debian/bacula-common.postinst
+++ b/debian/bacula-common.postinst
@@ -1,30 +1,9 @@
 #! /bin/sh
-# postinst script for bacula-director-common
-#
+set -e
 
 . /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'.
-
 case "$1" in
     configure)
 	chown bacula:bacula /var/lib/bacula
@@ -36,24 +15,6 @@ case "$1" in
         readOrCreatePasswords # create our common passwords if needed
 
     ;;
-
-    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-common.postrm b/debian/bacula-common.postrm
index ac9e3e2..588799d 100644
--- a/debian/bacula-common.postrm
+++ b/debian/bacula-common.postrm
@@ -1,23 +1,6 @@
 #! /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)
 		userdel bacula 2>&1 > /dev/null || true
@@ -25,20 +8,6 @@ case "$1" in
 		rm -rf /var/log/bacula
 		rm -rf /var/lib/bacula
 	;;
-
-	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-common.preinst b/debian/bacula-common.preinst
index d79a7de..40c5eac 100644
--- a/debian/bacula-common.preinst
+++ b/debian/bacula-common.preinst
@@ -1,79 +1,15 @@
 #! /bin/bash
-# preinst script for bacula
-#
-
 set -e
 
-# summary of how this script can be called:
-#        * <new-preinst> `install'
-#        * <new-preinst> `install' <old-version>
-#        * <new-preinst> `upgrade' <old-version>
-#        * <old-preinst> `abort-upgrade' <new-version>
-#
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-create_bacula_do_not_run()
-{
-	if [ "$1" = "install" -a "$#" -eq 1 ]; then
-		test -d /etc/bacula || mkdir -p /etc/bacula
-
-		cat > /etc/bacula/do_not_run <<EOF
-If this file exists as /etc/bacula/do_not_run, none of the Bacula daemons
-will start. 
-This is to allow you time to configure things before Bacula tries to 
-do anything.
-
-To make Bacula start, rename or remove this file.
-EOF
-
-	fi
-
-}
-
-
-#if [ "$1" = "install" -a "$#" -eq 1 ]; then
-#	create_bacula_do_not_run()
-#fi
-
-
 case "$1" in
-
 	install)
 		if ! getent passwd bacula >/dev/null; then
 			echo -n "Adding user 'bacula'... "
-			adduser --system --no-create-home --group bacula 2>&1 > /dev/null
-			usermod -c "Bacula" bacula
-			usermod -G tape bacula
+			adduser --system --home=/var/lib/bacula --group bacula 2>&1 > /dev/null
+			adduser bacula tape
 			echo "Ok."
-                        usermod -d /var/lib/bacula bacula
 		fi
 	;;
-
-	upgrade)
-               # Before 1.38.9-2, logs were in the wrong place.  Fix.
-               if dpkg --compare-versions "$2" lt 1.38.9-2 && 
-                   test -h /var/log/bacula/log &&
-                   test -f /var/lib/bacula/log; then
-                   rm /var/log/bacula/log
-                   mv /var/lib/bacula/log /var/log/bacula/log
-               fi
-	;;
-
-	abort-upgrade)
-	;;
-
-	*)
-		echo "preinst 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.postinst b/debian/bacula-director-common.postinst
index 25032d3..3d19ac8 100644
--- a/debian/bacula-director-common.postinst
+++ b/debian/bacula-director-common.postinst
@@ -1,55 +1,7 @@
 #! /bin/bash
-# postinst script for bacula-director-common
-#
+set -e
 
 . /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-dir.conf"
-
-
-case "$1" in
-    configure)
-
-     ;;
-
-    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-director-common.postrm b/debian/bacula-director-common.postrm
deleted file mode 100644
index a58f281..0000000
--- a/debian/bacula-director-common.postrm
+++ /dev/null
@@ -1,40 +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)
-	;;
-
-	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-mysql.config b/debian/bacula-director-mysql.config
index 07743ab..eba916e 100644
--- a/debian/bacula-director-mysql.config
+++ b/debian/bacula-director-mysql.config
@@ -1,5 +1,6 @@
 #!/bin/sh
 # config script for bacula-dir ( MySQL flavor )
+set -e
 
 . /usr/share/debconf/confmodule
 #db_version 2.0
@@ -12,20 +13,3 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
   . /usr/share/dbconfig-common/dpkg/config.mysql
   dbc_go bacula-director-mysql $@
 fi
-
-set -e
-
-case "$1" in
-        configure)
-        ;;
-
-	reconfigure)
-        ;;
-
-        *)
-                echo "config called with unknown argument \$1'" >&2
-                exit 0
-        ;;
-esac
-
-exit 0
diff --git a/debian/bacula-director-mysql.postinst b/debian/bacula-director-mysql.postinst
index 37965b4..683fc4d 100644
--- a/debian/bacula-director-mysql.postinst
+++ b/debian/bacula-director-mysql.postinst
@@ -1,30 +1,9 @@
 #! /bin/bash
-# postinst script for bacula-director-mysql
-#
+set -e
 
 . /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'.
-
 dbc_first_version=1.38.9-3
 # set in config, must not be set here: dbc_dbuser=bacula
 # set in config, must not be set here: dbc_dbname=bacula
@@ -46,5 +25,3 @@ db_stop
 invoke-rc.d --quiet bacula-director start
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-mysql.postrm b/debian/bacula-director-mysql.postrm
index 0fde970..3b527b3 100644
--- a/debian/bacula-director-mysql.postrm
+++ b/debian/bacula-director-mysql.postrm
@@ -1,15 +1,8 @@
 #! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
+set -e
 
 if [ -f /usr/share/debconf/confmodule ]; then
     . /usr/share/debconf/confmodule
-    db_version 2.0
-
-    dbc_first_version=1.38.9-3
-    dbc_dbuser=bacula
-    dbc_dbname=bacula
 fi
 
 if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
@@ -17,44 +10,4 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
     dbc_go bacula-director-mysql $@
 fi
 
-
-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)
-		# Drop Bacula's user privileges? Can't do	
-		# Potentially, drop DB ... Can't do?
-		db_purge
-	;;
-
-	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-mysql.prerm b/debian/bacula-director-mysql.prerm
index 87638b1..46bea2a 100644
--- a/debian/bacula-director-mysql.prerm
+++ b/debian/bacula-director-mysql.prerm
@@ -1,7 +1,5 @@
 #! /bin/sh
-# prerm script for bacula
-#
-# see: dh_installdeb(1)
+set -e
 
 . /usr/share/debconf/confmodule
 
@@ -15,35 +13,10 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
   dbc_go bacula-director-mysql $@
 fi
 
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
     remove|deconfigure)
 		/usr/sbin/invoke-rc.d bacula-director stop
         ;;
-    upgrade)
-	;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
 esac
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-pgsql.config b/debian/bacula-director-pgsql.config
index 348abb5..6fbae58 100644
--- a/debian/bacula-director-pgsql.config
+++ b/debian/bacula-director-pgsql.config
@@ -1,5 +1,6 @@
 #!/bin/sh
 # config script for bacula-dir ( PostgreSQL flavor )
+set -e
 
 . /usr/share/debconf/confmodule
 db_version 2.0
@@ -13,24 +14,3 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
   . /usr/share/dbconfig-common/dpkg/config.pgsql
   dbc_go bacula-director-pgsql $@
 fi
-
-set -e
-
-
-case "$1" in
-        configure)
-
-        ;;
-
-	reconfigure)
-
-	;;
-
-        *)
-                echo "config called with unknown argument \$1'" >&2
-                exit 0
-        ;;
-esac
-
-exit 0
-
diff --git a/debian/bacula-director-pgsql.postinst b/debian/bacula-director-pgsql.postinst
index 0ad9a4f..c4bf0c7 100644
--- a/debian/bacula-director-pgsql.postinst
+++ b/debian/bacula-director-pgsql.postinst
@@ -1,30 +1,9 @@
 #! /bin/bash
-# postinst script for bacula-director-pgsql
-#
+set -e
 
 . /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'.
-
 dbc_first_version=1.38.9-2
 # set in config, must not be set here: dbc_dbuser=bacula
 # set in config, must not be set here: dbc_dbname=bacula
@@ -48,5 +27,3 @@ db_stop
 invoke-rc.d --quiet bacula-director start
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-pgsql.postrm b/debian/bacula-director-pgsql.postrm
index 6f20fca..575422b 100644
--- a/debian/bacula-director-pgsql.postrm
+++ b/debian/bacula-director-pgsql.postrm
@@ -1,15 +1,9 @@
 #! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
+set -e
 
 if [ -f /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
         db_version 2.0
-
-        dbc_first_version=1.38.9-2
-        dbc_dbuser=bacula
-        dbc_dbname=bacula
 fi
 
 if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql  ]; then
@@ -17,40 +11,4 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql  ]; then
         dbc_go bacula-director-pgsql $@
 fi
 
-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)
-		db_purge
-	;;
-
-	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-pgsql.prerm b/debian/bacula-director-pgsql.prerm
index 9d8a2e7..ec37d99 100644
--- a/debian/bacula-director-pgsql.prerm
+++ b/debian/bacula-director-pgsql.prerm
@@ -1,8 +1,4 @@
 #! /bin/sh
-# prerm script for bacula
-#
-# see: dh_installdeb(1)
-
 set -e
 
 . /usr/share/debconf/confmodule
@@ -17,32 +13,10 @@ if [ -f /usr/share/dbconfig-common/dpkg/prerm.pgsql ]; then
   dbc_go bacula-director-pgsql $@
 fi
 
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
     remove|deconfigure)
 		/usr/sbin/invoke-rc.d bacula-director stop
         ;;
-    upgrade)
-	;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
 esac
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-sqlite3.config b/debian/bacula-director-sqlite3.config
index 8fcd40d..d9c8299 100644
--- a/debian/bacula-director-sqlite3.config
+++ b/debian/bacula-director-sqlite3.config
@@ -1,5 +1,6 @@
 #!/bin/sh
 # config script for bacula-director (SQLite3 flavor)
+set -e
 
 . /usr/share/debconf/confmodule
 #db_version 2.0
@@ -13,20 +14,3 @@ if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then
   . /usr/share/dbconfig-common/dpkg/config.sqlite3
   dbc_go bacula-director-sqlite3 $@
 fi
-
-set -e
-
-case "$1" in
-        configure)
-        ;;
-
-	reconfigure)
-        ;;
-
-        *)
-                echo "config called with unknown argument \$1'" >&2
-                exit 0
-        ;;
-esac
-
-exit 0
diff --git a/debian/bacula-director-sqlite3.postinst b/debian/bacula-director-sqlite3.postinst
index 498dc98..77ecf5c 100644
--- a/debian/bacula-director-sqlite3.postinst
+++ b/debian/bacula-director-sqlite3.postinst
@@ -1,30 +1,9 @@
 #! /bin/bash
-# postinst script for bacula-director-sqlite3
-#
+set -e
 
 . /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'.
-
 dbc_first_version=3.0.3-3
 dbc_dbfile_owner=bacula:bacula
 # set in config, must not be set here: dbc_dbuser=bacula
@@ -36,7 +15,6 @@ if [ -n "$2" ]; then
 	sleep 1
 fi
 
-
 # source dbconfig-common shell library, and call the hook function
 if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then
   . /usr/share/dbconfig-common/dpkg/postinst.sqlite3
@@ -49,5 +27,3 @@ db_stop
 invoke-rc.d --quiet bacula-director start
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-sqlite3.postrm b/debian/bacula-director-sqlite3.postrm
index 45bd528..781350e 100644
--- a/debian/bacula-director-sqlite3.postrm
+++ b/debian/bacula-director-sqlite3.postrm
@@ -1,46 +1,14 @@
 #! /bin/sh
-# postrm script for bacula
-#
-# see: dh_installdeb(1)
+set -e
 
 if [ -f /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
-    db_version 2.0
+	db_version 2.0
 fi
 
-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)
-		db_purge
-	;;
-	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.
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.sqlite3 ]; then
+    . /usr/share/dbconfig-common/dpkg/postrm.sqlite3
+    dbc_go bacula-director-sqlite3 $@
+fi
 
 #DEBHELPER#
-
-exit 0
diff --git a/debian/bacula-director-sqlite3.prerm b/debian/bacula-director-sqlite3.prerm
index e5e895b..37d65a4 100644
--- a/debian/bacula-director-sqlite3.prerm
+++ b/debian/bacula-director-sqlite3.prerm
@@ -1,40 +1,10 @@
 #! /bin/sh
-# prerm script for bacula
-#
-# see: dh_installdeb(1)
-
 set -e
 
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
     remove|deconfigure)
 		/usr/sbin/invoke-rc.d bacula-director stop
 	;;
-    upgrade)
-	;;
-    failed-upgrade)
-	;;
-    *)
-        echo "prerm 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.prerm b/debian/bacula-fd.prerm
deleted file mode 100644
index 163cd1d..0000000
--- a/debian/bacula-fd.prerm
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# prerm script for bacula-fd
-#
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|deconfigure)
-#       install-info --quiet --remove /usr/info/bacula.info.gz
-        ;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm 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.prerm b/debian/bacula-sd.prerm
deleted file mode 100644
index c50fc88..0000000
--- a/debian/bacula-sd.prerm
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# prerm script for bacula-sd
-#
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|deconfigure)
-#       install-info --quiet --remove /usr/info/bacula.info.gz
-        ;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm 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
-
-

-- 
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