I am running Linux 4.9.11-1.0.0 on my iMX7 dual development board. I have a
test.sh file that I would like to run at startup. It currently only has a bunch of
echo statements in it (just for testing purposes).
When I flick the switch on the board to turn it on, I see a bunch of initialization stuff come up. I would like the
echo statements in my
test.sh file to also be displayed in this initialization sequence on startup. Eventually once this is working, the plan is to do real stuff in place of the simple
echo statements. I just want to make sure the script is running on startup at this point.
So far I have created the
test.sh file and I am able to run it manually after the board has booted up. I have added the following to my
/etc/rc.local file before the exit statement at the end:
I have verified that this
rc.local file has
#!/bin/sh -e at the top. I have also done:
$ chown root /etc/rc.local $ chmod 777 /etc/rc.local
Once this was all done, I verified that it should be working properly by typing:
$ /etc/init.d/rc.local start
Everything is working as expected up until this point and I am seeing the
echo statements when I do that last step. However, when I go and try to reboot the board, I do not see the
echo statements at all in the printed initialization stuff.
What am I missing? Maybe it is actually running on startup but I just don't see the output for some reason?