Linux startup script seems not to have access to user environment
prblm: I was trying to configure a debian server, and the configuration script was suppose to run every time server boots up. The obvious thing to do would be to write a script and add it to rc.local. I was assuming that the script would be run as root user, and was using path and environment available to root user. But it nothing seemed to work, and on enabling boot logging, I figure out it could not find binaries in path.
solution: I am still not sure if the scripts executed at boot sequence are executed as root user with limited environment or they are executed as System user. But none the less, execute your commands as stated below
su -u root -l -c "<command>"
This will execute the command you want to execute as the root user, with his own environment as if he is logged in while executing the command. This comes in handy when lot of tools like svn, git manages authentication using files stored in user home directory, also there are certain path elements which are just too much to setup again.