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

Re: bookworm and network connections



On Fri, Sep 01, 2023 at 03:18:47PM -0600, D. R. Evans wrote:
> [[ I speculate wildly that systemd or something doesn't complete configuring
> the network until after rc.local has finished processing (I know that
> rc.local executes late in the boot process, but I don't think that that
> means that everything else has *finished* executing when rc.local runs). I
> may easily be wrong, but really I don't think I care. ]]

On Debian, there's an override file:


unicorn:~$ cat /usr/lib/systemd/system/rc-local.service.d/debian.conf 
[Unit]
# not specified by LSB, but has been behaving that way in Debian under SysV
# init and upstart
After=network-online.target

# Often contains status messages which users expect to see on the console
# during boot
[Service]
StandardOutput=journal+console
StandardError=journal+console


The "After=network-online.target" line is supposed to ensure that
rc-local.service doesn't run until the network configuration has been
completed.  However, the definition of "completed" here can be murky.
In particular, when using /etc/network/interfaces, only interfaces that
are marked as "auto" need to be up, to satisfy this criterion.  An
interface that's only "allow-hotplug" isn't required to be up.

Also, since the issue here involves network configuration, it would
seem counterintuitive to expect it to be done in a service that runs
*after* the network is supposed to be up.


Reply to: