View topic - Script must Start after reboot PC

Page 1 of 1

Script must Start after reboot PC

PostPosted: Sat May 01, 2021 2:32 pm
by verynew
Hello,
I'am using QNX6.5 and have the following problem.
I use a Bash Script and the Script must start after every reboot Form the PC.
With the crontab it is Not possible.
Hast anybody a solution ?
Thanks

Re: Script must Start after reboot PC

PostPosted: Mon May 03, 2021 12:59 pm
by Tim
http://www.qnx.com/developers/docs/6.5. ... rting.html

Call your script from rc.local (which likely doesn't exist so you may have to create one that just calls your script).

rc.sysinit and rc.local get run automatically at boot time.

Tim

Re: Script must Start after reboot PC

PostPosted: Tue May 04, 2021 4:18 am
by maschoen
I agree with everything Tim had to say.

It's probably best to run your script from rc.local.

It might be of interest, but none of this is prescribed by QNX, it is just convention which is commonly left alone.

If you build your own boot file, you can run whatever you want at startup. By convention, the build file does the minimum it needs to, and then starts a disk driver, mounts root and runs the shell script /etc/rc.sysinit. rc.local is called from within this script.

If you are deploying an embedded system and want to keep the users nosy eyes away from what is going on, you can embed your own startup script in the build file and run it. If it is a bash script you would need to make bash part of your .boot file.