summaryrefslogtreecommitdiff
path: root/debian/sane-utils.postinst
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-10-02 09:46:29 +0200
committerJörg Frings-Fürst <debian@jff.email>2022-10-02 09:46:29 +0200
commit9910a66b994fca5bba52a211a580dbc084b7ff98 (patch)
treea77fb8a6b747fb69a0b748fc2e33d3d5932a0db9 /debian/sane-utils.postinst
parent1e25318379249c8c4c2c55c741b409a858b1f52e (diff)
Fix purge error; Fix inetd handling
Diffstat (limited to 'debian/sane-utils.postinst')
-rw-r--r--debian/sane-utils.postinst11
1 files changed, 6 insertions, 5 deletions
diff --git a/debian/sane-utils.postinst b/debian/sane-utils.postinst
index b026a6e..b334d59 100644
--- a/debian/sane-utils.postinst
+++ b/debian/sane-utils.postinst
@@ -31,11 +31,12 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
db_get sane-utils/saned_scanner_group
SANED_IN_SCANNER="$RET"
- # Add saned service, disabled by default
- pathfind update-inetd
- if [ $? = 0 ]; then
- update-inetd --add "#<off># sane-port\tstream\ttcp\tnowait\tsaned:saned\t/usr/sbin/saned saned"
- fi
+ if [ -f /etc/inetd.conf ]; then
+ # Add saned service, disabled by default
+ if pathfind update-inetd ; then
+ update-inetd --add "#<off># sane-port\tstream\ttcp\tnowait\tsaned:saned\t/usr/sbin/saned saned"
+ fi
+ fi
# Stop debconf; output to stdout after this point. update-inetd needs debconf.
db_stop