Can not run reboot script when program started thru rc.local
I am running Fedora 14 and starting a c program from rc.local My program can request a system reboot from a script called rebootscript.sh that has been copied to the current working directory, also to the root/bin directory as well as to a user/bin directory. (I'm desperate... what can I say)
the program calls the script with
strcpy(name,"sudo /bin/sh rebootscript");
The rebootscript is as follows:
If I manually start the c program after the system boots up, it works fine. If I start the c program from rc.local it does not work. The only difference I see is that when starting from rc.local, root is the owner. When starting manually after boot, the user is the owner of the process.
What am I missing???
thanks for any help