LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2006, 06:41 PM   #1
mustangfanatic01
Member
 
Registered: Jul 2005
Location: California
Distribution: Slackware 11.0, Fedora Core 5
Posts: 80

Rep: Reputation: 15
Execute script on boot


Hi i have a simple question. I wrote a script that I want to execute when the machine boots up. It boots into run level 3 but I figured I could put the command in /etc/rc.d/rc.local. So I put in "./usr/local/sbin/update" Where the update is my script. I don't think this is getting run when I boot up so what am I doing wrong? How do I execute the script properly since the ./ probably isn't correct. Thanks!
 
Old 01-31-2006, 06:47 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
*edit*

Damnit, where's that delete button?

Last edited by mdarby; 01-31-2006 at 06:48 PM.
 
Old 01-31-2006, 06:56 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can add stuff to rc.local, but the commands need to be either found on the path that is set during system boot or to use an absolute path. You're using a relative path (the . says relative to the current directory). Try it as just /usr/local/sbin/update
 
Old 01-31-2006, 07:01 PM   #4
mustangfanatic01
Member
 
Registered: Jul 2005
Location: California
Distribution: Slackware 11.0, Fedora Core 5
Posts: 80

Original Poster
Rep: Reputation: 15
Thanks! Yea I didn't need that dot there. Also I needed to chmod +x update. Forgot that it needs to be executable for all before it can be run.
 
Old 01-31-2006, 07:01 PM   #5
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Also, make sure your script is executable (chmod +x /usr/local/sbin/update)
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Execute PHP Script? notooth Linux - General 2 06-02-2005 05:43 AM
Cannot execute a script grueugene Programming 15 01-27-2005 04:50 AM
boot script execute command as non-root user wampfler Linux - Security 7 09-24-2004 04:56 AM
Execute Script from Website cartoonwally Linux - General 10 05-28-2004 06:39 PM
Firewall Script Won't Execute jimminy34 Linux - Security 3 02-02-2003 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:51 AM.

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
Open Source Consulting | Domain Registration