LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-10-2004, 01:53 AM   #1
natedawg_38929
LQ Newbie
 
Registered: Oct 2002
Location: MS
Distribution: Slackware 9.1 XFS
Posts: 27

Rep: Reputation: 15
Angry Where is dhcpc invoked from?


ok..pulling my hair out!!! Where/how does dhcpc get invoked? The problem I'm having is that whenever my power suddenly goes out, the dhcpc-ethX.pid file doesnt get deleted as with a normal shutdown. When the box comes back up, it sees the old .pid file and doesnt initialize the interface.I've written a script to delete the junk .pid file, but I need to know where in which script to put it.
 
Old 03-10-2004, 01:57 AM   #2
Crazy Travis
Member
 
Registered: Feb 2004
Location: Knoxville TN
Distribution: gentoo
Posts: 104

Rep: Reputation: 15
misunderstood question.

Last edited by Crazy Travis; 03-10-2004 at 02:22 AM.
 
Old 03-10-2004, 02:13 AM   #3
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
If the power dropping out is a forever problem, try making a softlink pointing /var/run into the system ramdisk /dev/shm
That way all the pids get dropped when the system dies..

The ifup/ifdown script should be doing a ps ax to match the process name with the pid file to prove it is/isn't stale...

Have a look at /etc/inittab and follow the rc files from there.
It will be called from the sysinit rc file..
 
Old 03-10-2004, 02:26 AM   #4
natedawg_38929
LQ Newbie
 
Registered: Oct 2002
Location: MS
Distribution: Slackware 9.1 XFS
Posts: 27

Original Poster
Rep: Reputation: 15
Exclamation Addendum...

What specifically happened was...eth0 was my internal lan and eth1 was my external interface to the net, but, me being me, I wanted to swap them over making eth1 my internal and eth0 the external. I simply edited the rc.inet1.conf script and just swapped the info around. Now, for some unbeknownst reason, if I reboot the box, eth0 never gets a DHCP response and eth1 never initializes. ifconfig only shows loopback and eth0. But if i shutdown the box and power it back up, all is well. What gives?

PS -- I had also deleted all of the old stuff out of the dhcpc folder after i swapped all of the settings over so the box wouldnt get confused.
 
Old 03-10-2004, 03:42 AM   #5
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Hmmm..
I'm not a Slack user so I don't know how it handles runlevels, but it sounds like there is a different rc. closing sequence for shutdown than reboot.
That's normal in distros, esp SysV style, but have a look and see if you can spot the difference..
 
Old 03-10-2004, 09:06 AM   #6
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
Re: Where is dhcpc invoked from?

Quote:
Originally posted by natedawg_38929
ok..pulling my hair out!!! Where/how does dhcpc get invoked? The problem I'm having is that whenever my power suddenly goes out, the dhcpc-ethX.pid file doesnt get deleted as with a normal shutdown. When the box comes back up, it sees the old .pid file and doesnt initialize the interface.I've written a script to delete the junk .pid file, but I need to know where in which script to put it.
It is invoke by
/etc/rc.d/rc.inet1

When the power come back on, you can cd /etc/rc.d
./rc.inet1 stop
./rc.inet1 start

Or you can delete the dhcpc-ethX.pid file manually in /etc/dhcpc

and run the rc.inet1 script.
 
Old 03-23-2004, 02:43 AM   #7
natedawg_38929
LQ Newbie
 
Registered: Oct 2002
Location: MS
Distribution: Slackware 9.1 XFS
Posts: 27

Original Poster
Rep: Reputation: 15
Smile Solution!!

for some reason unbeknownst to me...after cron had a chance to run overnight, all is well. I say that cron was the answer, but all I know is, that everything was in order the next day. I rebooted the machine several times and everything is fine. Thanx for all of the replies!! If anyone might know why cron had something, if at all, to do with the solution, let me know...later guys!
 
  


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
/etc/dhcpc/dhcpcd-eth0.exe mattp Linux - Networking 4 02-19-2022 06:21 AM
Sound works only when Yast is invoked tbrownarcher Linux - Hardware 2 10-22-2005 01:34 PM
DHCPd, DHCPc - can they get along? wheelsg Linux - Networking 1 02-23-2004 07:01 PM
IRQ4 Serial Port Not invoked sinux Linux - Hardware 1 03-06-2003 03:45 PM
Mandrake 8.0, DHCPC over PCMCIA card doesn't work kris.kj.jacobs Linux - Networking 2 06-23-2001 03:45 AM

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

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