Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-12-2006, 01:19 PM   #1
LQ Newbie
Registered: Oct 2005
Location: Ireland
Posts: 11

Rep: Reputation: 0
init script not running

hello everyone. iv been trying to write a init script that will run at both boot and shutdown. the script is to creat a ramdisk and copy a load of files to it at boot time and copy the files back to the harddrive at shutdown. from what i can see the script itself is working, ie if i run it on the command line with start or stop args it does what its supose to. iv saved the file in "/etc/rc.d/init" and iv added a symbolic link to "/etc/rc.d/rc5.d" called "" to call the script at boot and another link in "/etc/rc.d/rc0.d" called "" to call it at shutdown. at boot the script is being called as it should, but at shutdown it isnt being called. i cant see what can be the problem. what i want is for it to be the first script called at shutdown hence the "K00" prefix. my distro is FC4 and im using the 2.6.16-1.2108_FC4 kernal.

if anyone has any ideas of where im going wrong or need more info please write back. any help will be greatly appreciated :-)
Old 06-12-2006, 01:39 PM   #2
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 110Reputation: 110
Does your script check if $1 is either "stop" "start",...?
Old 06-12-2006, 01:50 PM   #3
LQ Newbie
Registered: Oct 2005
Location: Ireland
Posts: 11

Original Poster
Rep: Reputation: 0
ye the script uses;
case "$1" in

the script works if i call it in the shell with "start" or "stop" as args. it just isnt being run when the system enters runlevel 0 during shutdown sequence.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running SUSE 9.2 and have an issue with init 0 sternbj Linux - Newbie 3 01-13-2006 06:04 PM
/etc/init.d running at boot time chakkerz Linux - General 2 12-10-2005 03:15 AM
Init running before other initialisation? fatzo Linux - General 2 02-26-2004 05:51 AM
inetd script in /etc/init.d is running amuck int0x80 Linux - Newbie 1 03-07-2003 09:51 PM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 07:21 PM > Forums > Non-*NIX Forums > Programming

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration