LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-16-2003, 09:24 AM   #1
bobthebuilder
LQ Newbie
 
Registered: Mar 2003
Posts: 2

Rep: Reputation: 0
Question 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?
 
Old 06-16-2003, 10:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,705
Blog Entries: 54

Rep: Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965
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?
 
Old 06-16-2003, 02:22 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a Perl script with SendMail NewByy Programming 2 08-25-2005 10:56 AM
Running a perl script bobfinners Linux - Software 1 06-23-2005 06:18 PM
running perl script dav_y2k Linux - Newbie 3 04-25-2005 06:00 AM
Running Perl Script upon startup andy7t Linux - Software 1 04-20-2005 05:43 PM
Perl script not running on FreeBSD J_Szucs *BSD 12 07-13-2002 10:05 AM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration