home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # postinst script for system-tools-backends
- #
- # 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'.
-
- case "$1" in
- configure)
- # only start system-tools-backends if it is not already running
- if [ ! -e /var/run/system-tools-backends.pid ] || ! ps --no-headers -p $(cat /var/run/system-tools-backends.pid) > /dev/null 2>&1; then
- if [ -x /etc/init.d/dbus ]; then
- invoke-rc.d dbus force-reload || true
- fi
- fi
-
- if dpkg --compare-versions "$2" lt "2.6.0-2ubuntu5"; then
- update-rc.d -f system-tools-backends remove
- fi
- ;;
- 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.
-
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/system-tools-backends" ]; then
- update-rc.d system-tools-backends start 50 2 3 4 5 . stop 70 1 . >/dev/null
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d system-tools-backends start || exit $?
- else
- /etc/init.d/system-tools-backends start || exit $?
- fi
- fi
- # End automatically added section
-
-
-
-
-