LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 03-13-2006, 08:04 AM   #1
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
Startupscripts in gentoo


Hy.

How can i simply add a command like mysql.server start or apachectl start into one of gentoo scripts? I read about gentoo startup scripts and took a look at them and they're nothing i'm used to it (i'm a slack user). Is there something like rc.local, where i could put this directives in and they'd be executed at last?

Thanx for help!
 
Old 03-13-2006, 10:08 AM   #2
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Usually you get a startup script installed along with the package. Are you sure you don't have them already?
 
Old 03-13-2006, 10:33 AM   #3
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Original Poster
Rep: Reputation: 35
Gentoo's startup scripts are in the /etc/ folder, if it's that what you mean and i have also startup scripts for mysql and apache. My problem is, i'd like to add startup directives for e.g. mysql and apache into the linux startup-script, to be started at boot time. On Slackware i simply add e.g.:
Code:
mysql.server start
into the /etc/rc.d/rc.local script. Slackware has this script just for additional system administration directives like the below one. Red hat and fedora use a similar philosophy, but gentoo is really different. I'm not sure if it'll work adding this directives (like the below one) to a custom written script located in /etc/init.d and linked from /etc/runlevels/default (my runlevel name is default). Yes, i could try out various settings, reboot the computer and i'll sooner or later come to the right conclusion, but the problem is, the computer i am working with is thousands of km away from me, so i don't have the opportunity to boot from CD, if i do something wrong...

Maybe, i'm completely wrong and Gentoo has a totaly different procedure of adding directives to be executed at startup?
 
Old 03-14-2006, 01:24 PM   #4
gruven
Member
 
Registered: Feb 2003
Location: Arkansas
Distribution: Debian
Posts: 87
Blog Entries: 3

Rep: Reputation: 15
In Gentoo, this is all you have to do.
Code:
rc-update add 'service name' default
So, if you wanted to add mysql to your default runlevel, then you would:
Code:
rc-update add mysql default
I think you can handle the rest. All it does really is create a symlink in the correct runlevel directory, but it is a nice tool to use. Then you can type:
Code:
rc-status
to make sure your services are running.

You may want to make sure of the name of the service first, by typing
Code:
ls /etc/init.d/
That should do what you want.
 
Old 03-27-2006, 01:06 PM   #5
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Original Poster
Rep: Reputation: 35
Gruven, thank you very much, that's i was looking for!!!
 
Old 03-28-2006, 07:13 PM   #6
gruven
Member
 
Registered: Feb 2003
Location: Arkansas
Distribution: Debian
Posts: 87
Blog Entries: 3

Rep: Reputation: 15
No problem. That is what I am here for.
 
  


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 do I start installing stage 3 of gentoo from universal gentoo 2005-1? kazuya1977 Linux - General 1 11-11-2005 10:30 AM
Dual G5 PowerPC: Install Gentoo/Gentoo on OSX? MadSkillzMan General 9 06-29-2005 02:17 PM
pkg-config error with emerge -aD gnome-python on Gentoo 2.6.9-gentoo-r6 ghrellin Linux - Software 2 12-22-2004 06:37 PM
Please help. Gentoo: Emerge gentoo-dev-sources fails sendas4 Linux - Newbie 3 07-19-2004 11:44 AM
Dual boot w/ Gentoo/xp pro vs. gentoo-invalid partition table bobbear Linux - Software 3 02-10-2004 04:28 PM

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

All times are GMT -5. The time now is 08:09 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