home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / procps.postinst < prev    next >
Encoding:
Text File  |  2007-03-07  |  2.8 KB  |  105 lines

  1. #!/bin/sh
  2. # postinst script for procps
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  14. #          <failed-install-package> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see http://www.debian.org/doc/debian-policy/ or
  17. # the debian-policy package
  18. #
  19. # quoting from the policy:
  20. #     Any necessary prompting should almost always be confined to the
  21. #     post-installation script, and should be protected with a conditional
  22. #     so that unnecessary prompting doesn't happen if a package's
  23. #     installation fails and the `postinst' is called with `abort-upgrade',
  24. #     `abort-remove' or `abort-deconfigure'.
  25.  
  26. case "$1" in
  27.     configure|abort-remove|abort-deconfigure)
  28.         if [ -e /etc/psdevtab ] ; then
  29.             rm -f /etc/psdevtab
  30.         fi
  31.         if [ -e /etc/psdatabase ] 
  32.         then
  33.             rm -f /etc/psdatabase
  34.         fi
  35.         # Remove old /etc/init.d/procps file, Bug #53818
  36.         if [ -e /etc/init.d/procps ]
  37.         then
  38.             rm -f /etc/init.d/procps
  39.         fi
  40.         # Remove old procps init.d script, if it exists Closes: #55137
  41.         if [ -e /etc/rcS.d/S30procps ]
  42.         then
  43.             update-rc.d procps remove >/dev/null
  44.         fi
  45.         # and if that didn't work Closes: #92184 (#234306 with -L )
  46.         if [ -L /etc/rcS.d/S30procps ]
  47.         then
  48.             rm -f /etc/rcS.d/S30procps
  49.         fi
  50.  
  51.         # Ubuntu boot order changes
  52.         if [ -L /etc/rcS.d/S30procps.sh ]; then
  53.             rm -f /etc/rcS.d/S30procps.sh
  54.         fi
  55.         if [ -L /etc/rcS.d/S05procps.sh ]; then
  56.             rm -f /etc/rcS.d/S05procps.sh
  57.         fi
  58.            
  59.         
  60.         #
  61.         # Now to do the alternatives for w and ps
  62.         update-alternatives --install /usr/bin/w w /usr/bin/w.procps 50 \
  63.             --slave /usr/share/man/man1/w.1.gz w.1.gz /usr/share/man/man1/w.procps.1.gz
  64.         
  65.     ;;
  66.  
  67.     abort-upgrade)
  68.         # Nothing to do
  69.     ;;
  70.  
  71.     *)
  72.         echo "postinst called with unknown argument \`$1'" >&2
  73.         exit 1
  74.     ;;
  75. esac
  76.  
  77. # dh_installdeb will replace this with shell code automatically
  78. # generated by other debhelper scripts.
  79.  
  80. # Automatically added by dh_installmenu
  81. if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
  82.     update-menus
  83. fi
  84. # End automatically added section
  85. # Automatically added by dh_installinit
  86. if [ -x "/etc/init.d/procps.sh" ]; then
  87.     update-rc.d procps.sh start 17 S . >/dev/null
  88.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  89.         invoke-rc.d procps.sh start || exit $?
  90.     else
  91.         /etc/init.d/procps.sh start || exit $?
  92.     fi
  93. fi
  94. # End automatically added section
  95. # Automatically added by dh_makeshlibs
  96. if [ "$1" = "configure" ]; then
  97.     ldconfig
  98. fi
  99. # End automatically added section
  100.  
  101.  
  102. exit 0
  103.  
  104.  
  105.