Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 11-21-2005, 02:39 AM   #1
LQ Newbie
Registered: Aug 2005
Posts: 11

Rep: Reputation: 0
'cannot stat' script in /etc/rc.d/, try to run script at startup

I want to run a script at machine startup. I think I should copy the script to /etc/init.d?? But when I try to do so, I get message :

'cp: cannot stat '' : No such file or directory

But the file is there in the directory.

Any suggestions?
Old 11-21-2005, 02:53 AM   #2
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,771

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
1st. Is the script executable? Run:
chmod +x
2. What distro are you using? If your distro uses /etc/init.d then you must create a symlink from your default runlevel to the script, i.e. if your default runlevel is 3, then:
ln -s /etc/init.d/ /etc/rc3.d/S99script
If your distro uses /etc/rc.d then add a line in /etc/rc.d/rc.local containing the name of the script


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Script at Startup?? usaf_sp Suse/Novell 5 11-11-2005 01:43 PM
get a script to run on startup kram Debian 3 04-23-2005 02:23 PM
'run as' from rc.5 startup script davee Linux - General 2 03-10-2005 02:36 AM
Run a script at startup iain.ross Linux - Newbie 8 08-27-2004 04:03 PM
How to run script on startup Angelis Linux - General 1 11-16-2003 05:45 AM

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

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