home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # postinst script for procps
- #
- # 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|abort-remove|abort-deconfigure)
- if [ -e /etc/psdevtab ] ; then
- rm -f /etc/psdevtab
- fi
- if [ -e /etc/psdatabase ]
- then
- rm -f /etc/psdatabase
- fi
- # Remove old /etc/init.d/procps file, Bug #53818
- if [ -e /etc/init.d/procps ]
- then
- rm -f /etc/init.d/procps
- fi
- # Remove old procps init.d script, if it exists Closes: #55137
- if [ -e /etc/rcS.d/S30procps ]
- then
- update-rc.d procps remove >/dev/null
- fi
- # and if that didn't work Closes: #92184 (#234306 with -L )
- if [ -L /etc/rcS.d/S30procps ]
- then
- rm -f /etc/rcS.d/S30procps
- fi
-
- # Ubuntu boot order changes
- if [ -L /etc/rcS.d/S30procps.sh ]; then
- rm -f /etc/rcS.d/S30procps.sh
- fi
- if [ -L /etc/rcS.d/S05procps.sh ]; then
- rm -f /etc/rcS.d/S05procps.sh
- fi
-
-
- #
- # Now to do the alternatives for w and ps
- update-alternatives --install /usr/bin/w w /usr/bin/w.procps 50 \
- --slave /usr/share/man/man1/w.1.gz w.1.gz /usr/share/man/man1/w.procps.1.gz
-
- ;;
-
- abort-upgrade)
- # Nothing to do
- ;;
-
- *)
- 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_installmenu
- if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
- update-menus
- fi
- # End automatically added section
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/procps.sh" ]; then
- update-rc.d procps.sh start 17 S . >/dev/null
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d procps.sh start || exit $?
- else
- /etc/init.d/procps.sh start || exit $?
- fi
- fi
- # End automatically added section
- # Automatically added by dh_makeshlibs
- if [ "$1" = "configure" ]; then
- ldconfig
- fi
- # End automatically added section
-
-
- exit 0
-
-
-