[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question about rc.local



On Fri 10 Mar 2023 at 18:47:02 (+0100), Vincent Lefevre wrote:
> On 2023-03-10 18:00:41 +0100, Christoph Brinkhaus wrote:
> > Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:
> > > On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> > > > On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > > > > Nicolas George <george@nsup.org> writes:
> > 
> > [snip - almost everything]
> > 
> > > > The man pages are most likely from upstream, and don't include the
> > > > changes provided by Debian (in debian.conf).
> > > 
> > > It would be useful to have the man page patched (as sometimes done),
> > > otherwise the user could be surprised.
> > 
> > I assume you read the man pages in French language?
> 
> No, in English, as usual (my whole system is in English, mainly to
> avoid translations, and this is also better for bug reports).
> 
> The rc-local.service(8) man page says:

  $ man rc-local.service
  No manual entry for rc-local.service
  $ apt-file find rc-local.service
  systemd: /lib/systemd/system/rc-local.service
  systemd: /lib/systemd/system/rc-local.service.d/debian.conf
  $ dpkg -L systemd | grep rc-local
  /lib/systemd/system/rc-local.service
  /lib/systemd/system/rc-local.service.d
  /lib/systemd/system/rc-local.service.d/debian.conf
  /lib/systemd/system-generators/systemd-rc-local-generator
  /usr/share/man/man8/systemd-rc-local-generator.8.gz
  $ man systemd-rc-local-generator | grep network
         run after network.target, but in parallel with most other regular system services.
  $ cat /etc/debian_version 
  11.6
  $ 

What am I missing?

>   Also note that rc-local.service is ordered after network.target, which
>   does not mean that the network is functional, see systemd.special(7).
>   If the script requires a configured network connection, it may be
>   desirable to pull in and order it after network-online.target with a
>   drop-in:
> 
>      # /etc/systemd/system/rc-local.service.d/network.conf
>      [Unit]
>      Wants=network-online.target
>      After=network-online.target
> 
> "After=network-online.target" is actually what
> /lib/systemd/system/rc-local.service.d/debian.conf does.
> So the user may be surprised that /etc/rc.local is not run
> earlier enough (or not run at all if the network is down
> when the machine is booted?).

Cheers,
David.


Reply to: