postinst is in beep 1.3-4+deb9u1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | #!/bin/sh
# postinst for beep
# copyright 2002-2016 by Rhonda D'Vine <rhonda@debian.org>
# Licenced under WTFPLv2
set -e
pathfind() {
OLDIFS="$IFS"
IFS=:
for p in $PATH; do
if [ -x "$p/$*" ]; then
IFS="$OLDIFS"
return 0
fi
done
IFS="$OLDIFS"
return 1
}
# Source debconf library.
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
if [ "$1" != configure ]; then
exit 0
fi
suid=false
if [ -e /usr/share/debconf/confmodule ]; then
db_get beep/suid_option
suid="$RET"
fi
# option changes as suggested by #492724
if [ "$suid" = "suid root for all" ] ; then
db_set beep/suid_option "usable for all"
suid="usable for all"
fi
if [ "$suid" = "suid root with only group audio executable" ] ; then
db_set beep/suid_option "usable for group audio"
suid="usable for group audio"
fi
if [ "$suid" = "not suid at all" ] ; then
db_set beep/suid_option "usable only for root"
suid="usable only for root"
fi
if pathfind dpkg-statoverride ; then
if ! dpkg-statoverride --list /usr/bin/beep >/dev/null ; then
if [ "$suid" = "usable for all" ] ; then
chmod 4755 /usr/bin/beep
elif [ "$suid" = "usable for group audio" ] ; then
chmod 4754 /usr/bin/beep
elif [ "$suid" = "usable only for root" ] ; then
chmod 0755 /usr/bin/beep
fi
fi
else
if [ "$suid" = "usable for all" ] ; then
chmod 4755 /usr/bin/beep
elif [ "$suid" = "usable for group audio" ] ; then
chmod 4754 /usr/bin/beep
elif [ "$suid" = "usable only for root" ] ; then
chmod 0755 /usr/bin/beep
fi
fi
|