3 # copyright 2002-2016 by Rhonda D'Vine <rhonda@debian.org>
4 # Licenced under WTFPLv2
12 if [ -x "$p/$*" ]; then
21 # Source debconf library.
22 if [ -e /usr/share/debconf/confmodule ]; then
23 . /usr/share/debconf/confmodule
26 if [ "$1" != configure ]; then
31 if [ -e /usr/share/debconf/confmodule ]; then
32 db_get beep/suid_option
36 # option changes as suggested by #492724
37 if [ "$suid" = "suid root for all" ] ; then
38 db_set beep/suid_option "usable for all"
41 if [ "$suid" = "suid root with only group audio executable" ] ; then
42 db_set beep/suid_option "usable for group audio"
43 suid="usable for group audio"
45 if [ "$suid" = "not suid at all" ] ; then
46 db_set beep/suid_option "usable only for root"
47 suid="usable only for root"
51 if pathfind dpkg-statoverride ; then
52 if ! dpkg-statoverride --list /usr/bin/beep >/dev/null ; then
53 if [ "$suid" = "usable for all" ] ; then
54 chmod 4755 /usr/bin/beep
55 elif [ "$suid" = "usable for group audio" ] ; then
56 chmod 4754 /usr/bin/beep
57 elif [ "$suid" = "usable only for root" ] ; then
58 chmod 0755 /usr/bin/beep
62 if [ "$suid" = "usable for all" ] ; then
63 chmod 4755 /usr/bin/beep
64 elif [ "$suid" = "usable for group audio" ] ; then
65 chmod 4754 /usr/bin/beep
66 elif [ "$suid" = "usable only for root" ] ; then
67 chmod 0755 /usr/bin/beep