Run script on boot

Applications, development tools, FPGA, C, WEB
Post Reply
swartjean
Posts: 11
Joined: Mon Jan 04, 2016 12:27 pm

Run script on boot

Post by swartjean » Thu Jan 14, 2016 1:46 pm

Hi there,

I am trying to run a script on boot and the instructions online seem to be to edit the /opt/etc/init.d/rcS file to append my commands.

However, the closest to that directory I have is /opt/redpitaya/etc/ and there is no init.d contained in that directory. The only contents of /etc/ are fw_env.config and network.

Has anyone had a similar experience?

Thanks very much

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Run script on boot

Post by Nils Roos » Fri Jan 15, 2016 1:34 pm

Unfortunately, the wiki is still not up to date with the 0.94 ecosystem, so any information about the OS and build process you find there is likely outdated. Look through the various README's in the github repository instead.

With the change to Debian 8 the startup is now based on systemd instead of System V. /etc/init.d/rcS still exists, but does not seem to be used. If you want to have your script run during startup, I guess you'll have to content with systemd, if running at login is sufficient, you could call it from /root/.bashrc .

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Run script on boot

Post by pavel » Fri Jan 15, 2016 2:29 pm

I'd say that the easiest way to run the commands automatically at boot is to add them to

Code: Select all

/etc/rc.local

swartjean
Posts: 11
Joined: Mon Jan 04, 2016 12:27 pm

Re: Run script on boot

Post by swartjean » Mon Jan 18, 2016 10:02 am

Thanks both of you.

Pavel, that's working perfectly for me.

swartjean
Posts: 11
Joined: Mon Jan 04, 2016 12:27 pm

Re: Run script on boot

Post by swartjean » Thu Jan 21, 2016 10:31 am

Hi there,

One more question, do you know how I can put the filesystem into read-write mode on boot?
I have tried to add rw to rc.local to no avail.

Thanks very much.

bryan.hayes
Posts: 6
Joined: Mon May 15, 2017 6:05 pm

Re: Run script on boot

Post by bryan.hayes » Wed Jul 19, 2017 4:23 pm

I know I'm a year and a half late to the party, but I'm having issues with rc.local. The RP runs scripts beautifully at boot for an arbitrary number of times. Randomly the RP freezes on boot and I'm forced to remake the SD card image. More detail here:

viewtopic.php?f=14&t=2066

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 19 guests