Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rc.local not working

Status
Not open for further replies.

jewel464g

Technical User
Jul 18, 2001
198
US
whenever I try to start a perl script in rc.local with the syntax /usr/bin/perl /root/strip.pl &
The file executes and runs, it's able to write to files but it can't execute commands that are within the script.

When faced with a decision, always ask, 'Which would be the most fun?'
 
Try placing those commands in a script somewhere and call the script at the end of the rc.local file.

echo "/usr/bin/perl /root/strip.pl &" >> /usr/local/sbin/script.sh

chmod 700 /usr/local/sbin/script.sh

...and then just add "/usr/local/sbin/script.sh" to the end of the rc.local file.


ChrisP
 
actually, just putting absolute paths in the file fixed the problem...sheesh. kinda like one of those no brainers.
 
yup, that would do it since their is no $PATH set when that file is run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top