From f3843702a12cf46f9cd4d1be772055ec6893a1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 27 Apr 2015 06:51:24 +0200 Subject: Release 1.0.25+git20150425-1 --- debian/sane-utils.postrm | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'debian/sane-utils.postrm') 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 "## sane-port" fi + # # purge systemd files # @@ -23,3 +48,5 @@ if [ "$1" = purge ]; then fi #DEBHELPER# + +exit 0 \ No newline at end of file -- cgit v1.2.3