Originally Posted by MODYSAMA
I put that command in the script code.
by the way I don't have the path /etc/rc.local
I have /etc/rc0.d/
Please whats wrong I do
I am assuming, you already tried what ianll said in an erlier post, i.e, changed the permission and added the bash directive at the beginning of the file.
Say, if your script is located at /home/user/x.sh
If you want to execute it for normal boot at boot time, add this line at the end of /etc/rc.local file
Now you said that you do not have any rc.local file. All I have used before is to edit rc.local file. So I not too sure about the next solution, but it should work:
You can add symlink to the script at your rc5.d folder (generally that is the run-level you'll use most of the time if you stick to default booting) by doing this:
ln -sf /home/user/x.sh S##x.sh
Here ## should be a number. The larger the number, the later it'll be executed among the scripts listed in that directory. You can try something like 99 to make sure all other system related scripts are executed first!
However, AFAIK, doing any of the above will mean the script will be run every time the system boots (even if no one logged in after booting).
Which linux are you using?
Look here if it of any help:
Also this seems a nice tool to manage boot-up scripts