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

Bo Berglund bo.berglund at gmail.com
Wed Oct 27 08:36:05 UTC 2021


On Wed, 27 Oct 2021 09:14:55 +0100, Colin Law <clanlaw at gmail.com> wrote:

>> $ grep "rc.local" /var/log/syslog
>> Oct 26 17:11:33 ubuntuserv systemd[1]: Starting LSB: Run /etc/rc.local if it
>> exist...
>> Oct 26 17:11:33 ubuntuserv systemd[1]: Started LSB: Run /etc/rc.local if it
>> exist.
>>
>> Oct 26 17:11:46 ubuntuserv systemd[1]: Starting /etc/rc.local Compatibility...
>> Oct 26 17:11:46 ubuntuserv systemd[1]: Started /etc/rc.local Compatibility.
>>
>
>As you can see it is being run twice.  The second one is the one that
>should be there, which is the service rc-local.service, which is the
>one that was made available when the automatic running of the script
>was removed from Ubuntu.  I don't know where the first one is coming
>from.  You should be able to stop the second one using
>sudo systemctl disable rc-local

Well, I just commented out the call in rc.local and then set it in crontab
instead.
Had to fix the path in crontab since it does not include sbin by itself..
But then it worksas intended which I reported in my previous post.


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list