[EdLUG] /etc/init.d/rc/local not executing

Edinburgh Linux Users Group edlug at lists.edlug.org.uk
Wed Dec 9 07:42:46 UTC 2015


Dick - I've had a look in /etc/rc2.d and there is a link /etc/rc2.d/S20rc.local
-> ../init.d/rc.local  but still no joy.

Justin - I think you are on the money,  it looks from  /var/log/apt/history.log
that sysvinit has been removed in favour of upstart.   I hate competing
standards.  Obligatory XKCD reference https://xkcd.com/927/

I think I will just use the cron @reboot option.  I had considered it but I
wanted to know why the system was broken.

AAARRRGH!!  I've just tried putting @reboot echo "running script" >
/home/pi/rc_test.txt into the root crontab and on reboot no text file is
generated.  /home is om the same partition as / on a simple pi install so I
think it should be mounted while cron is running for the first time.

I thought for a moment that the script I'm trying to run was the problem as it
twiddles gpio values in /sys and perhaps /sys was not created so early in the
booting but the test above disproves that.

AHA!!  It seems that the cron daemon is not being started either.  

I'll have to look into this later as I've got to go to work now.

Joe.

> On 08 December 2015 at 22:51 Edinburgh Linux Users Group
> <edlug at lists.edlug.org.uk> wrote:
> 
> 
> Edinburgh Linux Users Group wrote:
> > Hi,  any bright ideas?
> > 
> > I've just updated my raspbmc, now known as Kodi, and I am not seeing
> > /etc/init.d/rc.local executing on boot.  
> > 
> > I am using a Pi model B which reports via "lsb_release -a" as 
> > 
> > No LSB modules are available.
> > Distributor ID:	Debian
> > Description:	Debian GNU/Linux 7.8 (wheezy)
> > Release:	7.8
> > Codename:	wheezy
> 
> Well, if you'd dist-upgraded to Jessie I'd ask if you'd let it switch
> you from a traditional sysv-style init to the systemd version, since
> that reorganises a lot of this sort of stuff.
> 
> Googling "systemd rc.local" gets some plausible leads if that's it.
> If not I'd suggest looking for init-related packages in
> /var/log/apt/history.
> 
> Personally I've always done this sort of thing as a cronjob, since you
> can get them to run "@reboot" without having to worry about things
> like runlevels and dependency-based boot and so on.
> -- 
> Justin B Rye
> Ankh kak! (Ancient Egyptian blessing)
> 
> _______________________________________________
> EdLUG mailing list
> EdLUG at lists.edlug.org.uk
> https://lists.edlug.org.uk/mailman/listinfo/edlug



More information about the EdLUG mailing list