Your message dated Sun, 03 Feb 2019 23:12:21 +0000
with message-id <e1gqqw1-0005rs...@fasolo.debian.org>
and subject line Bug#920847: fixed in sysvinit 2.93-7
has caused the Debian Bug report #920847,
regarding init-d-script: add do_restart_prepare and do_reload_prepare handlers
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
920847: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920847
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: sysvinit
Version: 2.93-3
Severity: normal
Tags: patch

Dear Maintainer,

My package uses init-d-script and relies on defining a custom
"do_start_prepare" function to prevent starting the daemon if a
specific file exists.

While this works fine, it fails when the init.d script is invoked with
"restart" or "reload". In this case the "do_start_prepare" function is
not called. There doesn't seem to be a similar mechanism for "restart"
and "reload". This makes my init.d script significantly more
complicated to implement (cleanly).

Please consider the attached patch.

Cheers,

Mat.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), 
LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

*** /tmp/init-d-script.patch
diff -urN a/init-d-script b/init-d-script
--- a/init-d-script     2019-01-05 12:21:53.000000000 +0100
+++ b/init-d-script     2019-01-29 20:39:37.896029340 +0100
@@ -124,6 +124,9 @@
 }
 
 do_restart() {
+       if is_call_implemented do_restart_prepare ; then
+               call do_restart_prepare
+       fi
        [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
        call do_stop_cmd
        call do_start_cmd
@@ -131,6 +134,9 @@
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
+       if is_call_implemented do_restart_cleanup ; then
+               call do_restart_cleanup
+       fi
 }
 
 do_force_reload() {
@@ -144,10 +150,16 @@
 # Enable this using
 # alias do_reload=do_reload_sigusr1
 do_reload_sigusr1() {
+       if is_call_implemented do_reload_prepare ; then
+               call do_reload_prepare
+       fi
         log_daemon_msg "Reloading $DESC configuration files" "$NAME"
         start-stop-daemon --oknodo --stop --signal 1 --quiet \
           --pidfile "$PIDFILE" --exec "$DAEMON"
         log_end_msg $?
+       if is_call_implemented do_reload_cleanup ; then
+               call do_reload_cleanup
+       fi
 }
 
 do_status() {

--- End Message ---
--- Begin Message ---
Source: sysvinit
Source-Version: 2.93-7

We believe that the bug you reported is fixed in the latest version of
sysvinit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 920...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Bogatov <kact...@debian.org> (supplier of updated sysvinit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 03 Feb 2019 22:43:32 +0000
Source: sysvinit
Binary: sysvinit-core sysvinit-utils sysv-rc initscripts bootlogd
Architecture: source
Version: 2.93-7
Distribution: experimental
Urgency: medium
Maintainer: Debian sysvinit maintainers 
<debian-init-divers...@chiark.greenend.org.uk>
Changed-By: Dmitry Bogatov <kact...@debian.org>
Description:
 bootlogd   - daemon to log boot messages
 initscripts - scripts for initializing and shutting down the system
 sysv-rc    - System-V-like runlevel change mechanism
 sysvinit-core - System-V-like init utilities
 sysvinit-utils - System-V-like utilities
Closes: 920320 920323 920847 920887
Changes:
 sysvinit (2.93-7) experimental; urgency=medium
 .
   * Fix logic error in run_migrate() function (Closes: #920320)
     + Thanks: Pierre Ynard <linkfa...@yahoo.fr>
   * Fix stale /dev/shm symlink (Closes: #920323)
     + Thanks: Pierre Ynard <linkfa...@yahoo.fr>
   * Add pre- and post- hooks for reload/restart actions into init-d-script(5).
     Previously, only `start' action had such hook (Closes: #920847)
     + Thanks: Mathieu Mirmont <m...@parad0x.org>
   * Update Russian translations of debconf template (Closes: #920887)
     + Thanks: Lev Lamberov <dogs...@debian.org>
Checksums-Sha1:
 e6a22d4301bad8c642d11455d416fcc46525f43c 2657 sysvinit_2.93-7.dsc
 849c5ab0bca967e8a650be83a4cd81297c4c5480 127732 sysvinit_2.93-7.debian.tar.xz
 c1fb7f8aa44e25f67a1dddbfe8a74d6163d6c06d 5682 sysvinit_2.93-7_source.buildinfo
Checksums-Sha256:
 1c56bb7e03035a16cfcb148cd832940dd92404b38a520cb8c068efcf00b944a9 2657 
sysvinit_2.93-7.dsc
 f8b6d6446b856f8f7392a4d119d4fe5e5d09fdca7e29a6bd1f898853911ec91e 127732 
sysvinit_2.93-7.debian.tar.xz
 5ec1ad269058640ad5ef44bc6ad203aed8a7d9531604fa70ef88f16ec8f34e17 5682 
sysvinit_2.93-7_source.buildinfo
Files:
 85cb972c3b553f4967c8fc3852c537d6 2657 admin optional sysvinit_2.93-7.dsc
 adee53b23b1146327a2772bebc1cf309 127732 admin optional 
sysvinit_2.93-7.debian.tar.xz
 84baf28de160308866f3335c84c5bc56 5682 admin optional 
sysvinit_2.93-7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEEhnHVzDbtdH7ktKj4SBLY3qgmEeYFAlxXbxsTHGthY3Rpb25A
ZGViaWFuLm9yZwAKCRBIEtjeqCYR5sAFD/9oApApEQQQb3Mz5vOJJOAQTDxwgnUZ
w6Y9if3T4oycWDyq2Ip7LEn6JkZ7P/ROkyNyuUn3EkhIRNsh8ba7w5YUGfBc+8jt
c7aNETh71tafuN3Mkg9tnAtMUBllrIZUhJ3+x1XLHFHDNdXkgPVGYMM+NXWxyt+v
Hsja3Vg7nHXOVOOD/bEa3fiN8ZnGZ6xMRfIytxxPiXbGobVJ4hu5aR3DGFmXrIAx
JOiwHFhsvJiRDIB5YBPl6Q9qcOEfz8J/P5HGZvp1JwdRAdVrFmrNdP8osVmhnm1d
rPx0WHjG1RwDpMbLwBanQa2kb1L94gdFFIyNbhHOGQmn2wHwnfYjrWD4+2U6qWsb
4d/cmE2dsmHXnOahaihDheA15z7jKQ9UySU52Smn33AwGPaBrRkEpfcg07HIzYJp
zomcXntZAExo02rP/AbW2JcF37C329QrSolfXsXaA6jYgmLT4MA7KN8+lG/tLHkS
45M7BSG7VTjxGwYR/eQ1I0tketY432YRM3FmeMpYSAL/vBd6of3jSyJRsCDUU9+T
3sd6nDnH0RiPIc6dF3TsYJK2HZQgjkYG0SWglc0Vx/fpikYcHy2J/BHXxxwIve+/
4TMKPbSo0siy9OPVpU1sFBGigWXdP9k9eK5IqQ9GPjp/l1X4oi3Yw2WflJ6e+paX
leF6LH5sCzDd8g==
=NkSP
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to