diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-27 06:51:24 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-27 06:51:24 +0200 |
commit | f3843702a12cf46f9cd4d1be772055ec6893a1bb (patch) | |
tree | 3f3d8fe1f2b756dc2cd9fcff7b2e8e53539278ba /debian/sane-utils.postrm | |
parent | b2802d98d4486d6afc585062f4ca02fddf829dc5 (diff) |
Release 1.0.25+git20150425-1
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 |