|
Home > Archive > Red Hat General > August 2004 > elegant restart: how ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
elegant restart: how ?
|
|
|
| After having made changes to files in /etd/rc.d/init.d or the symlinks
in /etc/rc.d/rc3.d or any file related to/called by those, do I have
to "shutdown -r now" the computer ?
or is there a faster, more elegant way to make the changes effective
?
frgr
Erik
| |
|
| On Fri, 06 Aug 2004 12:25:39 +0200, a posting issued forth from Erik...
> After having made changes to files in /etd/rc.d/init.d or the symlinks
> in /etc/rc.d/rc3.d or any file related to/called by those, do I have
> to "shutdown -r now" the computer ?
> or is there a faster, more elegant way to make the changes effective
> ?
>
>
> frgr
> Erik
I assume you want to change the active services without start/stop
individual ones. Try:
init 1
as root, then when single-user mode loads
init 5 (or 3 if only want text)
HTH
--
Jacob
To email me, remove '-not-really' and '-possibly' from my email address.
| |
| Scott Lurndal 2004-08-06, 5:54 pm |
| Erik <et57 at correos calor dot com> writes:
>After having made changes to files in /etd/rc.d/init.d or the symlinks
>in /etc/rc.d/rc3.d or any file related to/called by those, do I have
>to "shutdown -r now" the computer ?
> or is there a faster, more elegant way to make the changes effective
>?
>
>
>frgr
>Erik
First off, you are not supposed to make changes to the links. You are
supposed to use the '/sbin/chkconfig' command to do that.
Once you have modified any startup scripts, or altered the active settings
with /sbin/chkconfig, you can use /sbin/service to start/stop any individual
service by name.
man chkconfig
/sbin/service <name> <option>
where name is the name of the file in /etc/rc.d/init.d and option is the
$1 value for the script (generally one of start, stop, status or restart).
They are just scripts, if you really want to, you can run them from the
command line at any time you like to either start or stop a service.
scott
| |
|
|
>They are just scripts, if you really want to, you can run them from the
>command line at any time you like to either start or stop a service.
>
>scott
But the order in which init.d/scripts are executed is important.
e.g. you MUST have the IPTables in place, before opening/initializing
the network.
I MUST have named, before I can execute ntpd and apache.
I must have named even, to execute certain IPTables rules.
So I may not always be allowed to just restart a script.
My conclusion is then, that I have to re-execute the entire suite of
init.d scripts...
How ?
frgr
Erik
| |
| Alexander Dalloz 2004-08-06, 5:54 pm |
| On Fri, 06 Aug 2004 20:44:14 +0200 Erik wrote:
> But the order in which init.d/scripts are executed is important.
> e.g. you MUST have the IPTables in place, before opening/initializing
> the network.
> I MUST have named, before I can execute ntpd and apache.
> I must have named even, to execute certain IPTables rules.
>
> So I may not always be allowed to just restart a script.
Wrong.
> My conclusion is then, that I have to re-execute the entire suite of
> init.d scripts...
Your conclusion is simply wrong. Don't make it more complicate as it is.
> Erik
Alexander
--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
| |
|
| On Fri, 06 Aug 2004 21:09:28 +0200, Alexander Dalloz
<alexander.dalloz@uni-bielefeld.de> wrote:
>On Fri, 06 Aug 2004 20:44:14 +0200 Erik wrote:
>
>
>Wrong.
>
>
>Your conclusion is simply wrong. Don't make it more complicate as it is.
>
>
>Alexander
Highly insufficient feedback.
WHY am I wrong ? and WHERE ?
frgr
Erik
| |
|
| Erik <et57 at correos calor dot com> wrote:
> Highly insufficient feedback.
But at least you got some. Be nice.
> WHY am I wrong ? and WHERE ?
You were right about some processes relying on others. However, you were
wrong to think that meant that you couldn't restart processes. You would
need to have the network running before a mail program could pick up mail,
but if there is no network, the mail program can still run. Not
productively, but it can still run. If you shut down the network completely
while mail is running, mail cannot get any new messages, but it will be
able to when the network is restarted.
Since you are just going to restart the scripts, there's very little
downtime. You can restart pretty much any of the init scripts (not making
it an absolute statement in case there are some that are a bit iffy) so go
forth and fiddle.
Pip
| |
|
| On Fri, 06 Aug 2004 23:22:25 GMT, Pip <Pip@cwci.TheKinkyUnderwear.com>
wrote:
>Erik <et57 at correos calor dot com> wrote:
>
>
>But at least you got some. Be nice.
>
I simply hate it when ppl tell me to accept things as they are,
without explanation, when I feel I have a legitimate question.
I wanna learn.
It feels very condescending, when I'm approached in this manner.
One can tell a 3-year old child to do this or that, without explaing,
just based on age or authority. I am past that age.
>
>You were right about some processes relying on others. However, you were
>wrong to think that meant that you couldn't restart processes. You would
What does it mean: I CAN restart...
I know I can give a command like "./iptables restart" anytime I want
but will it have exactly the same consequences as when the command is
executed in the "init.d-flow" after a "shutdown -r now" ?
>need to have the network running before a mail program could pick up mail,
>but if there is no network, the mail program can still run. Not
>productively, but it can still run. If you shut down the network completely
>while mail is running, mail cannot get any new messages, but it will be
>able to when the network is restarted.
Yes, but look at the iptables script: It sets up the entire FW before
the interfaces are initialized, as it should. But if I want to use
FQDN's in the script, is it not so, that "named" must run and have
internet access ?
In my IPtables rules, I have local domain- and hostnames, and external
ones (like www.yahoo.com etc), which must be resolved.
Now, you do not need FQDN's to set the FW DROP-policies and for
certain rules to filter weird source/destination/address/port
combinations. Which would suggest, that starting the FW would have to
be a two-or-more-stage process...
Also: the ntpd deamon needs internet access ro resolve the time-server
names in /etc/ntp/ntpservers.
>Since you are just going to restart the scripts, there's very little
>downtime. You can restart pretty much any of the init scripts (not making
>it an absolute statement in case there are some that are a bit iffy) so go
>forth and fiddle.
I go forth and fiddle. And learn.
I thank you for your time and energy.
fr gr
Erik
| |
|
| Erik <et57 at correos calor dot com> wrote:
> I simply hate it when ppl tell me to accept things as they are,
> without explanation, when I feel I have a legitimate question.
> I wanna learn.
Of course, and that's a legitimate thing to want. But this is a newsgroup:
you'll have people with very different levels of knowledge and tolerance,
some of whom have said the same thing many times over and are tired, or
have woken up in a bad mood, or just had a fight with their sheep. And
still they write back. If you don't like it, you have the choice to ignore
it, or pick up on the idea that it must have been talked about before and
see if you can find it elsewhere. You are quite at liberty to feel put out,
but it's not very productive to throw that feeling out onto the newsgroup:
it might put other people off the idea of trying to help.
> It feels very condescending, when I'm approached in this manner.
> One can tell a 3-year old child to do this or that, without explaing,
> just based on age or authority. I am past that age.
True, but we are not paid authority figures doing a job, we's jus' folks. Be
gentle with us.
> What does it mean: I CAN restart...
> I know I can give a command like "./iptables restart" anytime I want
> but will it have exactly the same consequences as when the command is
> executed in the "init.d-flow" after a "shutdown -r now" ?
The consequence is that the process is restarted, much like doing a kill
-HUP (someone step in if I've got this wrong). The configuration files are
re-read and the process comes into action with little, if any, actual
downtime.
> Yes, but look at the iptables script: It sets up the entire FW before
> the interfaces are initialized, as it should. But if I want to use
> FQDN's in the script, is it not so, that "named" must run and have
> internet access ?
You wouldn't run the FQDN request if you weren't on the net, so there's no
problem there. If you're restarting named, the network is still there. If
you're restarting the network, such that the process is still there, that
should be okay too. All these processes have to have built-in coping
mechanisms since they use the internet, and that is not an instant-reply
mechanism - servers can be down, packets can go missing. It's as I said
with e-mail: if the network isn't there, the client will just happily wait
for the next time it's available. If the network isn't there and you
desperately need the name for an address, or vice-versa, you're stuffed. If
there's a pause because there's a restart, the process can let it be known
that it's running, just not available for comment right now, can you hold
on a millisecond.
> In my IPtables rules, I have local domain- and hostnames, and external
> ones (like www.yahoo.com etc), which must be resolved.
.... and restarting processes won't get in the way of this.
> Now, you do not need FQDN's to set the FW DROP-policies and for
> certain rules to filter weird source/destination/address/port
> combinations. Which would suggest, that starting the FW would have to
> be a two-or-more-stage process...
The firewall doesn't need internet access to be set up, nor to run. It's
just a one-step process to set it up, one step to run it. Whether it has
any input of not isn't much of a concern to it: if nothing's coming in,
it's got no work to do. Who's going to complain about that?
> Also: the ntpd deamon needs internet access ro resolve the time-server
> names in /etc/ntp/ntpservers.
But it doesn't need continual access. It just reads it when it can. Not a
problem.
> I go forth and fiddle. And learn.
>
> I thank you for your time and energy.
No worries. I hope things go better for you now.
Pip
|
|
|
|
|