home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / apparmor.postinst < prev    next >
Encoding:
Text File  |  2009-04-08  |  1.5 KB  |  51 lines

  1. #!/bin/sh
  2. # postinst script for apparmor
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6.  
  7. # summary of how this script can be called:
  8. #        * <postinst> `configure' <most-recently-configured-version>
  9. #        * <old-postinst> `abort-upgrade' <new version>
  10. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  11. #          <new-version>
  12. #        * <postinst> `abort-remove'
  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.  
  20. # dh_installdeb will replace this with shell code automatically
  21. # generated by other debhelper scripts.
  22.  
  23. # Automatically added by dh_installinit
  24. if [ -x "/etc/init.d/apparmor" ]; then
  25.     update-rc.d apparmor start 37 S . >/dev/null
  26.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  27.         invoke-rc.d apparmor start || true
  28.     else
  29.         /etc/init.d/apparmor start || true
  30.     fi
  31. fi
  32. # End automatically added section
  33.  
  34.  
  35. # Now that AppArmor is started, attempt to reload profiles in the
  36. # case of upgrades (since dh_installinit has been forced not to unload
  37. # the profiles in the case of an upgrade).
  38. case "$1" in
  39.     configure)
  40.         if [ -x "/etc/init.d/apparmor" ]; then
  41.             if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  42.                 invoke-rc.d apparmor reload || true
  43.             else
  44.                 /etc/init.d/apparmor reload || true
  45.             fi
  46.         fi
  47.         ;;
  48. esac
  49.  
  50. exit 0
  51.