LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 07-07-2007, 04:57 PM   #1
licht
Member
 
Registered: Mar 2005
Location: chicago
Distribution: red hat 9.0
Posts: 59

Rep: Reputation: 15
Question Add a script to startup/init?


I use opensuse. I know "chkconfig" is a way to run some service when system inits at different levels. Now, I am thinking if it is ok to add a file "rc3.local" or "rc5.local" to /etc/init.d and then add link to either of them as "S99local" in /etc/init.d/rc3.d and in /etc/init.d/rc5.d respectively. So, I can add whatever program I want to run at startup to either rc3.local or rc5.local.

But this method fails to work. What is the problem? There is no problem in creating and writting files in the /tmp folder. If execute the rc3.local or rc5.local as root from command line, test.txt can be created as expected.

I also found the following two files in /etc/init.d: "boot.local" and "skeleton". Are they for customizing any startup script? Can anyone show an example? Thanks!

The following is the settings:

- cat /etc/init.d/rc3.local:
#! /bin/sh
touch /tmp/test.txt

- cat /etc/init.d/rc5.local:
#! /bin/sh
#touch /tmp/test.txt


- ls -l /etc/init.d/rc3.local
-rwxr-xr-x root root ..../etc/init.d/rc3.local

- ls -l /etc/init.d/rc5.local
-rwxr-xr-x root root ..../etc/init.d/rc5.local

- ls -l /etc/init.d/rc3.d/S99local
lrwxr-xr-x root root ... /etc/init.d/rc3.d/S99local -> ../rc3.local

- lls -l /etc/init.d/rc5.d/S99local
lrwxr-xr-x root root ... /etc/init.d/rc5.d/S99local -> ../rc5.local
 
Old 07-07-2007, 05:09 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 79
Your probably looking for something similar as discussed in this thread:

create a line automatically at every reboot
http://www.linuxquestions.org/questi...06#post2701806
 
Old 07-08-2007, 09:53 AM   #3
licht
Member
 
Registered: Mar 2005
Location: chicago
Distribution: red hat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bsdunix
Your probably looking for something similar as discussed in this thread:

create a line automatically at every reboot
http://www.linuxquestions.org/questi...06#post2701806

This sounds very positive and helpful I will try it later. Thanks!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add an init script? rogueeve Linux - Newbie 1 05-17-2007 03:53 PM
init.d startup script for familiar pevelius Linux - Laptop and Netbook 2 09-03-2004 12:22 PM
how do i add my script in init nukeu666 Linux - Newbie 1 08-16-2004 08:56 AM
Why won’t this init.d startup script work? dholingw Linux - Software 2 06-08-2004 03:40 PM
How to add something in init script Ypkis Linux - Newbie 5 10-12-2003 07:35 AM


All times are GMT -5. The time now is 09:44 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration