diff options
Diffstat (limited to 'debian/sane-utils.postrm')
-rw-r--r-- | debian/sane-utils.postrm | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/debian/sane-utils.postrm b/debian/sane-utils.postrm index a11d248..e7af639 100644 --- a/debian/sane-utils.postrm +++ b/debian/sane-utils.postrm @@ -1,12 +1,37 @@ #!/bin/sh -set -e +# set -e +# +# set -e are disabled because pathfind update-inetd +# gives an piuparts error. +# + +# +# POSIX-compliant shell function +# to check for the existence of a command +# Return 0 if found +# +pathfind() { + OLDIFS="$IFS" + IFS=: + for p in $PATH; do + if [ -x "$p/$*" ]; then + IFS="$OLDIFS" + return 0 + fi + done + IFS="$OLDIFS" + return 1 +} + -if [ "$1" = purge ]; then - if [ -x /usr/sbin/update-inetd ]; then +if [ "$1" = purge ] ; then + pathfind update-inetd + if [ $? = 0 ] ; then update-inetd --remove sane-port update-inetd --remove "#<off># sane-port" fi + # # purge systemd files # @@ -23,3 +48,5 @@ if [ "$1" = purge ]; then fi #DEBHELPER# + +exit 0
\ No newline at end of file |