You are not logged in.

#1 2003-11-30 18:36:11

kirkl_uk
Member
Registered: 2003-11-22
Posts: 41

Small network oddity

When stopping my network, I get the following message:

cat: /etc/dhcpc/dhcpcd-eth0.pid: No such file or directory

Instantly following that, I seem to be given the usage details for the kill command, and then I receive [fail].

Any ideas why I get this?

Kirk

Offline

#2 2004-07-14 20:43:41

marin_linuxer
Member
From: San Rafael, CA U.S.A.
Registered: 2003-09-03
Posts: 111
Website

Re: Small network oddity

I think this has to do with the fact that 'consumer' router's (i.e. Linksys/SMC/D-Link/etc.) sometimes hand-out 'infinite IP leases' which don't leave a 'pid' sitting around to kill(!?).

I need to re-open/re-write a bug-report about this.


-- Linux!  Isn't it time?

Offline

#3 2004-07-19 00:34:57

marin_linuxer
Member
From: San Rafael, CA U.S.A.
Registered: 2003-09-03
Posts: 111
Website

Re: Small network oddity

*
**
***     FIXED !

Judd has crafted a fix.  In the meantime, here's the code to replace the ifdown() in rc.shutdown:

ifdown()
{
if [ "$1" = "" ]; then
echo "usage: $0 ifdown <interface_name>"
return 1
fi
varname="$${1}"
eval new_ifline=$varname
if [ "$new_ifline" = "dhcp" ]; then
if [ -f /etc/dhcpc/dhcpcd-${1}.pid ]; then
/bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
else
# No .pid file, just bring the interface itself down
/sbin/ifconfig $1 down
fi
else
/sbin/ifconfig $new_ifline down
fi
return $?
} 

-- Linux!  Isn't it time?

Offline

Board footer

Powered by FluxBB