From 3377abb5b54d2b5dde72f7b715c3912f2a4000b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 21 Aug 2016 15:21:33 +0200 Subject: correct handling of the initscript stop and restart actions --- debian/changelog | 9 ++++----- debian/patches/series | 1 - debian/sane-utils.saned.init | 12 +++--------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4ec2976..638d083 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,5 @@ sane-backends (1.0.25-3) unstable; urgency=medium - * New debian/patches/0130-usb-timeout.patch: - - For the "Resource temporarily unavailable" error add a timeout to - function libusb_bulk_write (Closes: #810919). - Thanks to Steve Graham . * debian/rules: - For FTBFS on built with dpkg-buildpackage -A (Closes: #806104): + Split rules into *-arch and *-indep. @@ -29,8 +25,11 @@ sane-backends (1.0.25-3) unstable; urgency=medium * New debian/patches/0135-saned-remotescanners.patch to report network-attached devices (Closes: #821255). Thanks to Dhionel Díaz . + * At debian/sane-utils.saned.init correct handling of the stop and + restart actions (Closes: #829244). + Thanks to Chris Lamb . - -- Jörg Frings-Fürst Sun, 17 Apr 2016 21:11:18 +0200 + -- Jörg Frings-Fürst Sat, 18 Jun 2016 05:47:21 +0200 sane-backends (1.0.25-2) unstable; urgency=medium diff --git a/debian/patches/series b/debian/patches/series index 4e09def..b291883 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,5 +16,4 @@ 0705-kfreebsd.patch 0710-sane-desc.c_debian_mods.patch 0125-multiarch_dll_search_path.patch -0130-usb-timeout.patch 0135-saned-remotescanners.patch diff --git a/debian/sane-utils.saned.init b/debian/sane-utils.saned.init index 7b9fe18..5c87fc1 100644 --- a/debian/sane-utils.saned.init +++ b/debian/sane-utils.saned.init @@ -52,7 +52,7 @@ case "$1" in stop) log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + --retry --exec $DAEMON log_end_msg $? ;; force-reload) @@ -64,12 +64,8 @@ case "$1" in ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" - start-stop-daemon --stop --oknodo --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - log_end_msg $? + $0 stop + $0 start ;; status) if [ -s /var/run/$NAME.pid ]; then @@ -97,5 +93,3 @@ case "$1" in exit 1 ;; esac - -exit 0 -- cgit v1.2.3