LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-20-2007, 05:24 PM   #1
jcbparry
Member
 
Registered: Sep 2006
Distribution: Slackware 12, Fedora Core 5
Posts: 38

Rep: Reputation: 15
Adding a new startup process on Mandriva


I wanted to add a module that boots up and appears during the startup process. eg. Apache HTTPD Server. I have no clue how to write the code to do this. I want it to run a couple commands as root.

Thanks
 
Old 01-20-2007, 05:50 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Assuming it's the same as Red Hat/Fedora (should be as mandrake was originally based off Red Hat IIRC) then you should look at the /etc/rc.d/init.d directory and copy one of the initialization script there and modify it for your needs. Remember to write code for the start, stop, and restart parts. You can them add ormodify the chkconfig: and description: part of the init file (see man chkconfig for a description) and use the chkconfig command to activate your service to be started at boot.

If you want a simpler way of doing it just add the commands you want to run to the /etc/rc.local file, but you won't get a "starting ..." message unless you put the command to write it out into rc.local.
 
Old 01-20-2007, 06:27 PM   #3
jcbparry
Member
 
Registered: Sep 2006
Distribution: Slackware 12, Fedora Core 5
Posts: 38

Original Poster
Rep: Reputation: 15
Which script would you recommmend copying?
 
  


Reply

Tags
mandriva, module, startup



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
Mandriva install process ? Daiashi Mandriva 3 03-13-2006 05:07 AM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Configuring the startup process thephotoman Debian 5 10-01-2004 10:20 PM
adding module at boot process vrdhananjay Linux - Newbie 1 09-22-2004 03:24 AM
startup process thongor Slackware 2 03-21-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:21 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
Open Source Consulting | Domain Registration