unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38555: shepherd not working out of the box in Debian
@ 2019-12-09 20:51 burban
  0 siblings, 0 replies; only message in thread
From: burban @ 2019-12-09 20:51 UTC (permalink / raw)
  To: 38555


I run shepherd 0.6.1 (with guile 2.2.4) as the init system for Debian
buster. It's an installation in the standard place /usr/local.

When /usr/local/var/run/shepherd/socket is left dangling due to a crash,
shepherd won't start on the next reboot, as error SOCADDRINUSE is
raised.

Obviously this won't happen if --prefix is / and /var/run points to a
volatile file system, but chosing that prefix is probably not what
someone trying to test shepherd will do.

Below is my patch:

*** shepherd.scm	2019-12-08 18:11:19.820000000 +0000
--- shepherd.scm-ORI	2019-04-18 10:39:12.000000000 +0100
***************
*** 46,51 ****
        (fcntl sock F_SETFL (logior O_NONBLOCK
                                    (fcntl sock F_GETFL)))
-       ;; if file-name is still there, SOCADDRINUSE error is triggered
-       (when (file-exists? file-name) (delete-file file-name))
        (bind sock address)
        (listen sock 10)
--- 46,49 ----
***************
*** 186,191 ****
                     (%current-logfile-date-format
                      (if (and (not logfile) (zero? (getuid)))
! 			;; for syslog, first 2 characters are truncated
!                         (format #f "  shepherd[~d]: " (getpid))
                          default-logfile-date-format))
                     (current-output-port
--- 184,188 ----
                     (%current-logfile-date-format
                      (if (and (not logfile) (zero? (getuid)))
!                         (format #f "shepherd[~d]: " (getpid))
                          default-logfile-date-format))
                     (current-output-port


Notice the second patch, which corrects these kind of output in
/var/syslog:

Dec  9 20:18:18 buster cron[567]: (CRON) STARTUP (fork ok)
Dec  9 20:18:18 buster cron[567]: (CRON) INFO (Running @reboot jobs)
Dec  9 20:18:18 buster epherd[1]: Service sshd has been started.
Dec  9 20:18:18 buster epherd[1]: Service hwclock is already running.
Dec  9 20:18:18 buster epherd[1]: Service sendsigs is already running.
Dec  9 20:18:18 buster epherd[1]: Service hostname is already running.
Dec  9 20:18:18 buster epherd[1]: Service mountall-bootclean is already running.
Dec  9 20:18:19 buster rsyslogd:  [origin software="rsyslogd" swVersion="8.1901.0" x-pid="556" x-info="https://www.rsyslog.com"] start
Dec  9 20:23:18 buster anacron[562]: Job `cron.daily' started
Dec  9 20:23:18 buster anacron[625]: Updated timestamp for job `cron.daily' to 2019-12-09

-- 

Bernard

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-10  3:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 20:51 bug#38555: shepherd not working out of the box in Debian burban

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).