Re: rc init scripts

This is a discussion on Re: rc init scripts within the Linux Administration forums, part of the Linux Forums category; Me :) wrote: > Hi > Linux newbie here. I'm trying to get mysql / smb / httpd to auto-start on &...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-14-2003
renrutv
 
Posts: n/a
Default Re: rc init scripts

Me :) wrote:

> Hi
> Linux newbie here. I'm trying to get mysql / smb / httpd to auto-start on
> bootup of the server. From most of the documentation I found on the web I
> was supposed to
> 1) copy the startup script to /etc/init.d (Did this , scripts work by
> invoking them with a start parameter)
> 2) create symbolic links prefaced with S and followed by a number in one
> of the run level directories (I did this in rc3.d)
> Rebooted the computer, they didnt work.
> I then deleted the symbolic links and tried adding them using chkconfig
> -add mysql.server (the mysql default script), following this chkconfig
> --list showed mysql ON on runlevel 2 and 4. But it still didnt work. I
> also added httpd at runlevel 3, no dice with that either (the httpd script
> did have the chkconfig values preset).
>
> Any idea what I'm doing wrong or not doing? Thanks a LOT :)
>
> Muhammed


Are you sure you're booting into runlevel 3? The default on most distros is
runlevel 5 (graphical logon mode). Type /sbin/runlevel and check. If you
see something like:

N 5

This means your in runlevel 5 (It's the last number that tells the current
runlevel).

You can also check the runlevel by looking at /etc/inittab and looking for
the line that says:

# The default runlevel is defined here
id:5:initdefault:

If you are runlevel 5 you need to do your above changes to /etc/init.d/rc5.d
not /etc/init.d/rc3.d.

Reply With Quote
  #2 (permalink)  
Old 07-15-2003
Me :\)
 
Posts: n/a
Default Re: rc init scripts


"renrutv" <renrutv@yahoo.com> wrote in message
news:SNDQa.1682$Mc.154270@newsread1.prod.itd.earth link.net...
> Me :) wrote:
>
> > Hi
> > Linux newbie here. I'm trying to get mysql / smb / httpd to auto-start

on
> > bootup of the server. From most of the documentation I found on the web

I
> > was supposed to
> > 1) copy the startup script to /etc/init.d (Did this , scripts work by
> > invoking them with a start parameter)
> > 2) create symbolic links prefaced with S and followed by a number in one
> > of the run level directories (I did this in rc3.d)
> > Rebooted the computer, they didnt work.
> > I then deleted the symbolic links and tried adding them using chkconfig
> > -add mysql.server (the mysql default script), following this chkconfig
> > --list showed mysql ON on runlevel 2 and 4. But it still didnt work. I
> > also added httpd at runlevel 3, no dice with that either (the httpd

script
> > did have the chkconfig values preset).
> >
> > Any idea what I'm doing wrong or not doing? Thanks a LOT :)
> >
> > Muhammed

>
> Are you sure you're booting into runlevel 3? The default on most distros

is
> runlevel 5 (graphical logon mode). Type /sbin/runlevel and check. If you
> see something like:
>
> N 5
>
> This means your in runlevel 5 (It's the last number that tells the current
> runlevel).
>
> You can also check the runlevel by looking at /etc/inittab and looking for
> the line that says:
>
> # The default runlevel is defined here
> id:5:initdefault:
>
> If you are runlevel 5 you need to do your above changes to

/etc/init.d/rc5.d
> not /etc/init.d/rc3.d.
>


Hi again,
Thanks a lot :), ur solution worked like a charm. I had erroneously thought
that all of the rcX.d scripts run , not only the ones in the same runlevel
ur logging in to. One other question, since the runlevel may be changed
later, to make sure that the services I want are running, should I add the
symbolic link to all the run levels 2 thru 5? No harm in doing that?

Muhammed
PS Thanks again :)


Reply With Quote
  #3 (permalink)  
Old 07-16-2003
V. Turner
 
Posts: n/a
Default Re: rc init scripts

Me :) wrote:

>
> "renrutv" <renrutv@yahoo.com> wrote in message
> news:SNDQa.1682$Mc.154270@newsread1.prod.itd.earth link.net...
>> Me :) wrote:
>>
>> > Hi
>> > Linux newbie here. I'm trying to get mysql / smb / httpd to auto-start

> on
>> > bootup of the server. From most of the documentation I found on the web

> I
>> > was supposed to
>> > 1) copy the startup script to /etc/init.d (Did this , scripts work by
>> > invoking them with a start parameter)
>> > 2) create symbolic links prefaced with S and followed by a number in
>> > one of the run level directories (I did this in rc3.d)
>> > Rebooted the computer, they didnt work.
>> > I then deleted the symbolic links and tried adding them using chkconfig
>> > -add mysql.server (the mysql default script), following this chkconfig
>> > --list showed mysql ON on runlevel 2 and 4. But it still didnt work. I
>> > also added httpd at runlevel 3, no dice with that either (the httpd

> script
>> > did have the chkconfig values preset).
>> >
>> > Any idea what I'm doing wrong or not doing? Thanks a LOT :)
>> >
>> > Muhammed

>>
>> Are you sure you're booting into runlevel 3? The default on most distros

> is
>> runlevel 5 (graphical logon mode). Type /sbin/runlevel and check. If
>> you see something like:
>>
>> N 5
>>
>> This means your in runlevel 5 (It's the last number that tells the
>> current runlevel).
>>
>> You can also check the runlevel by looking at /etc/inittab and looking
>> for the line that says:
>>
>> # The default runlevel is defined here
>> id:5:initdefault:
>>
>> If you are runlevel 5 you need to do your above changes to

> /etc/init.d/rc5.d
>> not /etc/init.d/rc3.d.
>>

>
> Hi again,
> Thanks a lot :), ur solution worked like a charm. I had erroneously
> thought that all of the rcX.d scripts run , not only the ones in the same
> runlevel ur logging in to. One other question, since the runlevel may be


Actually, this is really not a bad assumption. Other versions of Unix *do*
work this way. On Solaris, runlevel 5 means execute the scripts for
runlevels 1,2,3,4 and then 5. So all your network stuff is added to
runlevel3. Runlevel 5 would just start the X stuff and wouldn't have to
bother with the network stuff because it had already been started. On
Linux the runlevels are "orthogonal", and run independently of each other.

> changed later, to make sure that the services I want are running, should I
> add the symbolic link to all the run levels 2 thru 5? No harm in doing
> that?


Yes, definitely, although practically speaking runlevels 3 and 5 are all
you have to be concerned with (at least that's my experience as I'm just
running a workstation for browsing the web etc).


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT +1. The time now is 04:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0