restart a service during boot?

lorenzo plorenzo at disroot.org
Fri Aug 13 15:05:21 BST 2021


On Tue, 3 Aug 2021 21:46:50 +0200 (CEST)
Thorsten Glaser <t.glaser at tarent.de> wrote:

> On Tue, 3 Aug 2021, tito wrote:
> 
> > to be run after inetutils-syslogd ?
> 
> But before anything else that would otherwise depend on syslogd?

I'm probably missing something but why udev need to run before anything
else that depends on syslog?
Do you have services that generate /dev events?

Did you try something like (or some variation of) the following:
(Not tested)

$cat /etc/init.d/restart-udev 
#! /bin/sh

### BEGIN INIT INFO
# Provides:             runtime udev
# Required-Start:       $syslog
# Required-Stop:        $syslog
# Default-Start:        2 3 4 5
# Default-Stop:
# Short-Description:    runtime udev: log to syslog
### END INIT INFO

set -e

case "$1" in
  start|restart)
  /etc/init.d/udev restart
  ;;
  stop)
  /etc/init.d/udev stop
  ;;
  status)
  /etc/init.d/udev status
  ;;
esac

exit 0

> That’s also something I never managed. Dependencies sure, but
> “run immediately after”? Nope.
> 
> Thanks,
> //mirabilos

Lorenzo



More information about the Debian-init-diversity mailing list