From ef58e692289049ccf74175dbe242ed48e9e61b2f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 20 Jul 2006 22:17:39 +0000 Subject: Commit of Sami's debian packaging improvements git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1979 ce84e21b-d406-0410-9b95-82705330c041 --- debian/bcfg2.postinst | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 debian/bcfg2.postinst (limited to 'debian/bcfg2.postinst') diff --git a/debian/bcfg2.postinst b/debian/bcfg2.postinst new file mode 100644 index 000000000..c287c962a --- /dev/null +++ b/debian/bcfg2.postinst @@ -0,0 +1,52 @@ +#!/bin/sh +# postinst script for bcfg2 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + ucf /usr/share/bcfg2/bcfg2.conf /etc/bcfg2.conf + ucf /usr/share/bcfg2/bcfg2.default /etc/default/bcfg2 + ;; + + 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# + +if [ -x "/etc/init.d/bcfg2" ]; then + update-rc.d bcfg2 defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d bcfg2 start || exit $? + else + /etc/init.d/bcfg2 start || exit $? + fi +fi + +exit 0 + + -- cgit v1.2.3-1-g7c22