Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

postinst 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. # postinst script for postsrsd
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6. # summary of how this script can be called:
  7. # * <postinst> `configure' <most-recently-configured-version>
  8. # * <old-postinst> `abort-upgrade' <new version>
  9. # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  10. # <new-version>
  11. # * <postinst> `abort-remove'
  12. # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  13. # <failed-install-package> <version> `removing'
  14. # <conflicting-package> <version>
  15. # for details, see http://www.debian.org/doc/debian-policy/ or
  16. # the debian-policy package
  17. if [ "$1" = "configure" -a ! -f /etc/postsrsd.secret ]
  18. then
  19. echo "postsrsd: Generating initial /etc/postsrsd.secret" >&2
  20. ( umask 0077 ; dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64 -w0 > /etc/postsrsd.secret )
  21. fi
  22. if [ "$1" = "configure" -o "$1" = "abort-deconfigure" -o "$1" = "abort-remove" ]
  23. then
  24. if [ -x /sbin/apparmor_parser ]
  25. then
  26. apparmor_parser -r -W -T /etc/apparmor.d/usr.sbin.postsrsd
  27. fi
  28. fi
  29. # dh_installdeb will replace this with shell code automatically
  30. # generated by other debhelper scripts.
  31. #DEBHELPER#
  32. exit 0