12345678910111213141516171819202122232425262728293031323334353637383940 |
- #!/bin/sh
- # postinst script for postsrsd
- #
- # 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>
- # * <postinst> `abort-remove'
- # * <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
-
-
- if [ "$1" = "configure" -a ! -f /etc/postsrsd.secret ]
- then
- echo "postsrsd: Generating initial /etc/postsrsd.secret" >&2
- ( umask 0077 ; dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64 -w0 > /etc/postsrsd.secret )
- fi
-
- if [ "$1" = "configure" -o "$1" = "abort-deconfigure" -o "$1" = "abort-remove" ]
- then
- if [ -x /sbin/apparmor_parser ]
- then
- apparmor_parser -r -W -T /etc/apparmor.d/usr.sbin.postsrsd
- fi
- fi
-
- # dh_installdeb will replace this with shell code automatically
- # generated by other debhelper scripts.
-
- #DEBHELPER#
-
- exit 0
|