LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   problems running a perl script from rc.local (https://www.linuxquestions.org/questions/linux-general-1/problems-running-a-perl-script-from-rc-local-65910/)

bobthebuilder 06-16-2003 08:24 AM

problems running a perl script from rc.local
 
I have a perl script that i run from rc.local so its there when i boot, however, it runs, but it doesn't work....if that makes sense.

If i run it from the command line after boot it works just great.

so i'm not real sure how to describe it.


any ideas?

unSpawn 06-16-2003 09:43 AM

Well, what's the permissions on the file, the path to the interpreter, and what's the proposed commandline to run it?
What does "perl -w script 2>&1>/tmp/errors.log" give you in the log?
And if you run this line from rc.local?

bulliver 06-16-2003 01:22 PM

If you run it from the cli as "perl scriptname" it will work, but if you are using rc.local you must tell it which interpreter to use using a bangline, which is typically #!/usr/bin/perl (though you may have perl elsewhere, and should fix the path accordingly). This must be the first line in the script.


All times are GMT -5. The time now is 07:03 AM.