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

Bo Berglund bo.berglund at gmail.com
Tue Oct 26 16:44:58 UTC 2021


On Tue, 26 Oct 2021 16:17:32 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:

>On Tue, 26 Oct 2021 10:51:24 +0100, Colin Law <clanlaw at gmail.com> wrote:
>
>>>
>>> This is the *only* command inside rc.local:
>>>
>>> /home/bosse/bin/ipreport.sh 60 &
>>>
>>
>>Add a command to log something from there and then you can check
>>whether it is being called twice or whether something else is going
>>on.
>
>Now done that including a timestamp with seconds, now I have to wait until the
>next restart to see if it works properly or not.
>
>The server is busy most of the time so I usually have to pick a quiet time for
>admin work which need rebooting.
>
>In any case when adding logging I ran it manually and there is only a single
>mail being sent then.
>
Now rebooted and received 2 messages.
The log file contains 2 lines too:

2021-10-26 17:12:33 Reporting iaddr=192.168.119.216
2021-10-26 17:12:45 Reporting iaddr=192.168.119.216

They are spaced 12 seconds apart.


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list