Is /etc/rc.local called twice on boot?

Chris Green cl at isbd.net
Tue Oct 26 08:13:48 UTC 2021


On Tue, Oct 26, 2021 at 12:47:59AM +0200, Bo Berglund wrote:
> I have a custom call in /etc/rc.local to report the IP address of the system on
> boot. It is set to run 60 seconds after the rc.local itself gets called.
> This has worked fine in several installations both on Ubuntu and Raspbian.
> 
> But now (maybe since upgrading to 20.04 from 18.04) each time I reboot the call
> is made twice with about 10 seconds time difference.
> 
> So I wonder if /etc/rc.local is called twice during boot nowadays?
> 
I rune things from rc.local in 20.04 and haven't seen this happening.

I'd *guess* that something else is reporting the IP address, this is
done by some things I believe.  You could try removing the call from
rc.local and see if you still get the IP address reported.

-- 
Chris Green




More information about the ubuntu-users mailing list