LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to interrupt service at startup (https://www.linuxquestions.org/questions/linux-general-1/how-to-interrupt-service-at-startup-56614/)

mehlkelm 04-24-2003 02:43 PM

how to interrupt service at startup
 
hi

sometimes my LAN connection is disconnected when I want to boot linux, so the booting stops trying to start interface eth0 (my network device) until I get up and get the stupid cable. Is there a possibility interrupt the eth0 while it 'hangs' and go on without it whenever I dont need it?

(and if yes: how to start eth0 later?)

stef

david_ross 04-24-2003 02:51 PM

You can run:
chkconfig network off

To disable the network from starting at boot and then run (as root):
service network start

To start networking once you have booted.

webtoe 04-24-2003 04:02 PM

hmmm, not sure whether this would work with your setup but i know that when my ISP's dhcp server is down (happens occaisionally) and the computer sits there trying to talk to it I can stop it by doing ctrl-c. This works with most linux apps but not sure whether it would with a static IP address allocation. Usually with a static IP it would just complain a bit and then carry on.

Alex

P.S. if it is dhcp then i can help otherwise, this post is useless

mehlkelm 04-25-2003 01:57 AM

Quote:

Originally posted by webtoe
P.S. if it is dhcp then i can help otherwise, this post is useless
It is dhcp!

but still, I tried Ctr-c. without success.

webtoe 04-25-2003 08:41 AM

Try jabbing it a few times, or try the ctrl-d. This has worked for me before.

To start dhcp later you need to use something like the following as root (and with the cable in ;-) )
Code:

/sbin/dhcpcd -h user_name_for_isp
There may be some problems here however.
1.) I use Slackware which uses dhcpcd and I'm not sure whether Red Hat uses this program or another dhcp client.
2.) Cable modem providers are different in the way they use dhcp. Some use different settings that dhcp will have to be told about and may need the hostname or not. If in doubt, poke around in the startup scripts for the one that attempts the dhcp lookup when you switch the box on. There should be the various commands needed there. If dhcp is in its own script with nothing else but the dhcp setup in it (which is very possible for Red Hat) you may just be able to run this script.

Or you could have a look at the Cable-providers How-to on www.tldp.org (though last time I checked they still hadn't altered the entry for ntlworld (which I found was wrong and told them bout).

HTH

Alex

mehlkelm 04-26-2003 02:41 PM

Quote:

Try jabbing it a few times, or try the ctrl-d. This has worked for me before.
i could slam my keyboard with no result.

whenever I boot without the LAN-cable, booting pauses for 2 minutes at:
"Interface eth0 hochfahren..."
followed by a ping result Summary (3 packages sent, 0 received, 3 errors (which I could have told 2 minutes earlier :) ))

I dont have cable, I have ADSL, if that makes any difference in anyones next advice ;)

Tinkster 04-26-2003 04:29 PM

david_ross's solution looks alright to
me ... if you need networking later on
you can always su -c dhcpd (or whatever
comes with your distro) ...

Or -since it's "little red ridinghood" - you
can use the Press I option and just say no
to networking ;)

Cheers,
Tink

david_ross 04-27-2003 09:05 AM

I forgot about this thread. You could also modify your network startup script to prompt you like:
"Do you want network support [Y/N]: "

This would give you time to either plug in the cable and say yes or just select no and start it later.

mehlkelm 05-03-2003 10:24 AM

Quote:

Originally posted by david_ross
You could also modify your network startup script to prompt you like:
"Do you want network support [Y/N]: "


In what file would you do it?
/etc/init.d/network ?

david_ross 05-03-2003 10:35 AM

I think so. Depending on the result of the question you can either "ifup eth0" or continue.


All times are GMT -5. The time now is 12:01 AM.