In Ubuntu I have a C++ QT program in which I call an external script (.sh).
If I run the program manually (from the command line) everything works fine (the script get called correctly) but if the program get called at the startup (by putting it in /etc/init.d and running update-rc.d) the program run correctly, but the script doesn’t start.
I finally solved. The problem was in the script (script1.sh) itself since it used a call to another script (script2.sh): in script1 the call to script2 was done like this “script2”. I changed that call to /path/to/script2/script2 and everything works fine.
The finally question is: why do I need to specify the absolute script path if this was in the environment path ($PATH)?