From 9910a66b994fca5bba52a211a580dbc084b7ff98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Oct 2022 09:46:29 +0200 Subject: Fix purge error; Fix inetd handling --- debian/changelog | 4 ++++ debian/sane-utils.postinst | 11 ++++++----- debian/sane-utils.postrm | 6 +----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 36c11d2..8c477e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,10 @@ sane-backends (1.1.1-6) UNRELEASED; urgency=medium * Fix build error with gcc12 (Closes: #1013034): - New debian/patches/0200-disable-check-equal-stderr.patch. + Thanks to Nathan Pratta Teodosio . + * debian/sane-utils.postrm: + - Fix purge error (Closes: #1008822). + * debian/sane-utils.postinst: + - Fix inetd handling (Closes: #1009354). -- Jörg Frings-Fürst Mon, 28 Mar 2022 17:33:56 +0200 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 "## 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 "## 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 diff --git a/debian/sane-utils.postrm b/debian/sane-utils.postrm index f5a0394..c748af6 100644 --- a/debian/sane-utils.postrm +++ b/debian/sane-utils.postrm @@ -1,10 +1,6 @@ #!/bin/sh set -e -# -# set -e are disabled because pathfind update-inetd -# gives an piuparts error. -# # # POSIX-compliant shell function @@ -54,8 +50,8 @@ if [ "$1" = purge ] ; then # remove user / group # if pathfind deluser ; then - deluser -q --group --system saned || true deluser -q --system --remove-home saned || true + deluser -q --group --system saned || true fi fi -- cgit v1.2.3