* Switch to source format 3.0 (quilt).
* New patch fix-makefile to make make clean not fail.
* Add #DEBHELPER# to post{inst,rm} files.
+ * Use pathfind() function instead of hardcoded path to dpkg-statoverride.
--
#!/bin/sh
# postinst for beep
-# copyright 2002-2011 by Rhonda D'Vine <rhonda@debian.org>
+# 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 [ -x /usr/sbin/dpkg-statoverride ] ; then
+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