From nobody@FreeBSD.org  Tue Jan  4 16:44:27 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8012016A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Jan 2005 16:44:27 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6D03943D1F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Jan 2005 16:44:27 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j04GiQ5T029842
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Jan 2005 16:44:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j04GiQ20029841;
	Tue, 4 Jan 2005 16:44:26 GMT
	(envelope-from nobody)
Message-Id: <200501041644.j04GiQ20029841@www.freebsd.org>
Date: Tue, 4 Jan 2005 16:44:26 GMT
From: Radko Keves <rado@daemon.sk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dhclient is stoped twice in pccard_ether script
X-Send-Pr-Version: www-2.3

>Number:         75808
>Category:       conf
>Synopsis:       dhclient is stopped twice in pccard_ether script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 04 16:50:18 GMT 2005
>Closed-Date:    Mon Jan 17 15:43:54 GMT 2005
>Last-Modified:  Mon Jan 17 15:43:54 GMT 2005
>Originator:     Radko Keves
>Release:        FreeBSD 5.3-RELEASE-p1 i386
>Organization:
nothing
>Environment:
FreeBSD gaila.emea.cpqcorp.net 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #0: Wed Dec  1 01:00:40 CET 2004     root@:/usr/src/sys/i386/compile/angel  i386

>Description:
      dhclient is stoped twice in pccard_ether script

first time in dhclient -rs ${interface}
second time in sh /etc/rc.d/dhclient stop
>How-To-Repeat:
      run pccard_ether <nic> <start|stop>
>Fix:
+ diff -r -u /etc/pccard_ether /etc/pccard_ether-new
--- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
+++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
@@ -65,8 +65,6 @@
        else
                return
        fi
-       /sbin/dhclient -r ${interface}
-       rm -f ${pidfile}
        case ${startstop} in
        [Ss][Tt][Oo][Pp])
                if [ -z "${_nlist}" ]; then

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Tue Jan 4 16:54:23 GMT 2005 
Responsible-Changed-Why:  
Take care of this one too. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75808 

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc: Ceri Davies <ceri@FreeBSD.org>
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Tue, 4 Jan 2005 17:19:43 +0000

 On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > 
 > >Description:
 >       dhclient is stoped twice in pccard_ether script
 > 
 > first time in dhclient -rs ${interface}
 > second time in sh /etc/rc.d/dhclient stop
 > >How-To-Repeat:
 >       run pccard_ether <nic> <start|stop>
 > >Fix:
 > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > @@ -65,8 +65,6 @@
 >         else
 >                 return
 >         fi
 > -       /sbin/dhclient -r ${interface}
 > -       rm -f ${pidfile}
 >         case ${startstop} in
 >         [Ss][Tt][Oo][Pp])
 >                 if [ -z "${_nlist}" ]; then
 
 Hi Radko,
 
 Are you actually removing the bge0 interface?
 
 If so, could you try this patch instead:
 
 Index: etc/pccard_ether
 ===================================================================
 RCS file: /home/ncvs/src/etc/pccard_ether,v
 retrieving revision 1.41
 diff -u -r1.41 pccard_ether
 --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 @@ -70,7 +70,7 @@
  	case ${startstop} in
  	[Ss][Tt][Oo][Pp])
  		if [ -z "${_nlist}" ]; then
 -			sh `/etc/rc.d/dhclient start`
 +			sh /etc/rc.d/dhclient start
  		else
  			start_dhcp_keep_current
  		fi
 
 
 If you are not removing the interface, could you see if
 "/etc/rc.d/netif bge0 stop" does the right thing?  I'm beginning to
 wonder whether /etc/pccard_ether is intended for use by humans at all.
 
 Thanks,
 
 Ceri
 -- 
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 11:40:04 +0100

 Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > >Description:
 > >       dhclient is stoped twice in pccard_ether script
 > > 
 > > first time in dhclient -rs ${interface}
 > > second time in sh /etc/rc.d/dhclient stop
 > > >How-To-Repeat:
 > >       run pccard_ether <nic> <start|stop>
 > > >Fix:
 > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > @@ -65,8 +65,6 @@
 > >         else
 > >                 return
 > >         fi
 > > -       /sbin/dhclient -r ${interface}
 > > -       rm -f ${pidfile}
 > >         case ${startstop} in
 > >         [Ss][Tt][Oo][Pp])
 > >                 if [ -z "${_nlist}" ]; then
 > 
 
 this is another problem (as i see it)
 everything is working but, script try to stop dhclient twice
 
 > Hi Radko,
 > 
 > Are you actually removing the bge0 interface?
 > 
 > If so, could you try this patch instead:
 > 
 > Index: etc/pccard_ether
 > ===================================================================
 > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > retrieving revision 1.41
 > diff -u -r1.41 pccard_ether
 > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > @@ -70,7 +70,7 @@
 >  	case ${startstop} in
 >  	[Ss][Tt][Oo][Pp])
 >  		if [ -z "${_nlist}" ]; then
 > -			sh `/etc/rc.d/dhclient start`
 > +			sh /etc/rc.d/dhclient start
 >  		else
 >  			start_dhcp_keep_current
 >  		fi
 > 
 
 your patch is working fine, but it looks like script is try to stop
 dhclient twice
 
 so maybe you can investigate this too
 
 > 
 > If you are not removing the interface, could you see if
 > "/etc/rc.d/netif bge0 stop" does the right thing?  I'm beginning to
 > wonder whether /etc/pccard_ether is intended for use by humans at all.
 > 
 
 
 $ sudo /etc/rc.d/netif bge0 stop           
 /etc/rc.d/netif: unknown directive 'bge0'.
 Usage: /etc/rc.d/netif [fast|force|one](start stop restart rcvar cloneup clonedown)
 $ sudo /etc/rc.d/netif stop bge0
 Stopping network:/etc/rc.d/netif: ERROR: No such network interface: bge0
 $ sudo /etc/rc.d/netif stop bge0
 $ ifconfig |grep bge
 bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu
 1500 inet6 fe80::208:2ff:fedd:48fb%bge0 prefixlen 64 scopeid 0x2 
 
 
 
 i think it doesn't matter if /etc/pccard_ether is used by human or not,
 for me is important functionality
 
 
 > Thanks,
 > 
 
 Regards,
 
 > Ceri
 
 Rado
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 11:04:20 +0000

 On Wed, Jan 05, 2005 at 11:40:04AM +0100, Radko Keves wrote:
 > Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > > >Description:
 > > >       dhclient is stoped twice in pccard_ether script
 > > > 
 > > > first time in dhclient -rs ${interface}
 > > > second time in sh /etc/rc.d/dhclient stop
 > > > >How-To-Repeat:
 > > >       run pccard_ether <nic> <start|stop>
 > > > >Fix:
 > > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > > @@ -65,8 +65,6 @@
 > > >         else
 > > >                 return
 > > >         fi
 > > > -       /sbin/dhclient -r ${interface}
 > > > -       rm -f ${pidfile}
 > > >         case ${startstop} in
 > > >         [Ss][Tt][Oo][Pp])
 > > >                 if [ -z "${_nlist}" ]; then
 > > 
 > 
 > this is another problem (as i see it)
 > everything is working but, script try to stop dhclient twice
 > 
 > > Hi Radko,
 > > 
 > > Are you actually removing the bge0 interface?
 > > 
 > > If so, could you try this patch instead:
 > > 
 > > Index: etc/pccard_ether
 > > ===================================================================
 > > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > > retrieving revision 1.41
 > > diff -u -r1.41 pccard_ether
 > > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > > @@ -70,7 +70,7 @@
 > >  	case ${startstop} in
 > >  	[Ss][Tt][Oo][Pp])
 > >  		if [ -z "${_nlist}" ]; then
 > > -			sh `/etc/rc.d/dhclient start`
 > > +			sh /etc/rc.d/dhclient start
 > >  		else
 > >  			start_dhcp_keep_current
 > >  		fi
 > > 
 > 
 > your patch is working fine, but it looks like script is try to stop
 > dhclient twice
 
 It shouldn't do with this patch.
 
 Ceri
 -- 
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 13:59:35 +0100

 Wed, Jan 05, 2005 at 11:04:20AM +0000, Ceri Davies said that
 > On Wed, Jan 05, 2005 at 11:40:04AM +0100, Radko Keves wrote:
 > > Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > > > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > > > >Description:
 > > > >       dhclient is stoped twice in pccard_ether script
 > > > > 
 > > > > first time in dhclient -rs ${interface}
 > > > > second time in sh /etc/rc.d/dhclient stop
 > > > > >How-To-Repeat:
 > > > >       run pccard_ether <nic> <start|stop>
 > > > > >Fix:
 > > > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > > > @@ -65,8 +65,6 @@
 > > > >         else
 > > > >                 return
 > > > >         fi
 > > > > -       /sbin/dhclient -r ${interface}
 > > > > -       rm -f ${pidfile}
 > > > >         case ${startstop} in
 > > > >         [Ss][Tt][Oo][Pp])
 > > > >                 if [ -z "${_nlist}" ]; then
 > > > 
 > > 
 > > this is another problem (as i see it)
 > > everything is working but, script try to stop dhclient twice
 > > 
 > > > Hi Radko,
 > > > 
 > > > Are you actually removing the bge0 interface?
 > > > 
 > > > If so, could you try this patch instead:
 > > > 
 > > > Index: etc/pccard_ether
 > > > ===================================================================
 > > > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > > > retrieving revision 1.41
 > > > diff -u -r1.41 pccard_ether
 > > > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > > > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > > > @@ -70,7 +70,7 @@
 > > >  	case ${startstop} in
 > > >  	[Ss][Tt][Oo][Pp])
 > > >  		if [ -z "${_nlist}" ]; then
 > > > -			sh `/etc/rc.d/dhclient start`
 > > > +			sh /etc/rc.d/dhclient start
 > > >  		else
 > > >  			start_dhcp_keep_current
 > > >  		fi
 > > > 
 > > 
 > > your patch is working fine, but it looks like script is try to stop
 > > dhclient twice
 > 
 > It shouldn't do with this patch.
 > 
 
 but:
 su-2.05b# sh pccard_ether bge0 stop
 dhclient not running? (check /var/run/dhclient.pid).
 ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 
 ---
         /sbin/dhclient -r ${interface}
         rm -f ${pidfile}
         case ${startstop} in
         [Ss][Tt][Oo][Pp])
                 if [ -z "${_nlist}" ]; then
                          sh /etc/rc.d/dhclient stop
 ---
 
 in case when ${_nlist} has zero lenght first time dhclient is stopped
 first time with:
         /sbin/dhclient -r ${interface}
 and second time with:
         sh /etc/rc.d/dhclient stop
 
 
 this don't sounds good
 
 so maybe only the condition is bad and we can change it:
 
  if [ -z "${_nlist}" ] && [ -s ${pidfile}]; then
          sh /etc/rc.d/dhclient stop
 
 > Ceri
 
 Rado
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 13:28:18 +0000

 --+d/sD+4Memv8CeGA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 01:59:35PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 11:04:20AM +0000, Ceri Davies said that
 > > On Wed, Jan 05, 2005 at 11:40:04AM +0100, Radko Keves wrote:
 > > > Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > > > > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > > > > >Description:
 > > > > >       dhclient is stoped twice in pccard_ether script
 > > > > >=20
 > > > > > first time in dhclient -rs ${interface}
 > > > > > second time in sh /etc/rc.d/dhclient stop
 > > > > > >How-To-Repeat:
 > > > > >       run pccard_ether <nic> <start|stop>
 > > > > > >Fix:
 > > > > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > > > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > > > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > > > > @@ -65,8 +65,6 @@
 > > > > >         else
 > > > > >                 return
 > > > > >         fi
 > > > > > -       /sbin/dhclient -r ${interface}
 > > > > > -       rm -f ${pidfile}
 > > > > >         case ${startstop} in
 > > > > >         [Ss][Tt][Oo][Pp])
 > > > > >                 if [ -z "${_nlist}" ]; then
 > > > >=20
 > > >=20
 > > > this is another problem (as i see it)
 > > > everything is working but, script try to stop dhclient twice
 > > >=20
 > > > > Hi Radko,
 > > > >=20
 > > > > Are you actually removing the bge0 interface?
 > > > >=20
 > > > > If so, could you try this patch instead:
 > > > >=20
 > > > > Index: etc/pccard_ether
 > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > > > > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > > > > retrieving revision 1.41
 > > > > diff -u -r1.41 pccard_ether
 > > > > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > > > > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > > > > @@ -70,7 +70,7 @@
 > > > >  	case ${startstop} in
 > > > >  	[Ss][Tt][Oo][Pp])
 > > > >  		if [ -z "${_nlist}" ]; then
 > > > > -			sh `/etc/rc.d/dhclient start`
 > > > > +			sh /etc/rc.d/dhclient start
 > > > >  		else
 > > > >  			start_dhcp_keep_current
 > > > >  		fi
 > > > >=20
 > > >=20
 > > > your patch is working fine, but it looks like script is try to stop
 > > > dhclient twice
 > >=20
 > > It shouldn't do with this patch.
 > >=20
 >=20
 > but:
 > su-2.05b# sh pccard_ether bge0 stop
 > dhclient not running? (check /var/run/dhclient.pid).
 > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 >=20
 > ---
 >         /sbin/dhclient -r ${interface}
 >         rm -f ${pidfile}
 >         case ${startstop} in
 >         [Ss][Tt][Oo][Pp])
 >                 if [ -z "${_nlist}" ]; then
 >                          sh /etc/rc.d/dhclient stop
 
 That line should read "sh /etc/rc.d/dhclient start".
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --+d/sD+4Memv8CeGA
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB2+tyocfcwTS3JF8RAgNlAKCYpcCyyihpmvcWqHCZIaP47eo7xQCfT4Z5
 PHLBZVSIfcvjUnbsVeFhTPc=
 =NIlx
 -----END PGP SIGNATURE-----
 
 --+d/sD+4Memv8CeGA--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 14:35:26 +0100

 Wed, Jan 05, 2005 at 01:28:18PM +0000, Ceri Davies said that
 > On Wed, Jan 05, 2005 at 01:59:35PM +0100, Radko Keves wrote:
 > > Wed, Jan 05, 2005 at 11:04:20AM +0000, Ceri Davies said that
 > > > On Wed, Jan 05, 2005 at 11:40:04AM +0100, Radko Keves wrote:
 > > > > Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > > > > > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > > > > > >Description:
 > > > > > >       dhclient is stoped twice in pccard_ether script
 > > > > > > 
 > > > > > > first time in dhclient -rs ${interface}
 > > > > > > second time in sh /etc/rc.d/dhclient stop
 > > > > > > >How-To-Repeat:
 > > > > > >       run pccard_ether <nic> <start|stop>
 > > > > > > >Fix:
 > > > > > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > > > > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > > > > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > > > > > @@ -65,8 +65,6 @@
 > > > > > >         else
 > > > > > >                 return
 > > > > > >         fi
 > > > > > > -       /sbin/dhclient -r ${interface}
 > > > > > > -       rm -f ${pidfile}
 > > > > > >         case ${startstop} in
 > > > > > >         [Ss][Tt][Oo][Pp])
 > > > > > >                 if [ -z "${_nlist}" ]; then
 > > > > > 
 > > > > 
 > > > > this is another problem (as i see it)
 > > > > everything is working but, script try to stop dhclient twice
 > > > > 
 > > > > > Hi Radko,
 > > > > > 
 > > > > > Are you actually removing the bge0 interface?
 > > > > > 
 > > > > > If so, could you try this patch instead:
 > > > > > 
 > > > > > Index: etc/pccard_ether
 > > > > > ===================================================================
 > > > > > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > > > > > retrieving revision 1.41
 > > > > > diff -u -r1.41 pccard_ether
 > > > > > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > > > > > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > > > > > @@ -70,7 +70,7 @@
 > > > > >  	case ${startstop} in
 > > > > >  	[Ss][Tt][Oo][Pp])
 > > > > >  		if [ -z "${_nlist}" ]; then
 > > > > > -			sh `/etc/rc.d/dhclient start`
 > > > > > +			sh /etc/rc.d/dhclient start
 > > > > >  		else
 > > > > >  			start_dhcp_keep_current
 > > > > >  		fi
 > > > > > 
 > > > > 
 > > > > your patch is working fine, but it looks like script is try to stop
 > > > > dhclient twice
 > > > 
 > > > It shouldn't do with this patch.
 > > > 
 > > 
 > > but:
 > > su-2.05b# sh pccard_ether bge0 stop
 > > dhclient not running? (check /var/run/dhclient.pid).
 > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > 
 > > ---
 > >         /sbin/dhclient -r ${interface}
 > >         rm -f ${pidfile}
 > >         case ${startstop} in
 > >         [Ss][Tt][Oo][Pp])
 > >                 if [ -z "${_nlist}" ]; then
 > >                          sh /etc/rc.d/dhclient stop
 > 
 > That line should read "sh /etc/rc.d/dhclient start".
 
 why ?
 
 when you run:
 /etc/pccard_ether bge0 stop
 
 you don't want to dhclient be started again, but to be stoped
 
 
 am i right ?
 
 
 > 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 14:04:05 +0000

 --X9hp/qFlD/MyfJCu
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 02:35:26PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 01:28:18PM +0000, Ceri Davies said that
 > > On Wed, Jan 05, 2005 at 01:59:35PM +0100, Radko Keves wrote:
 > > > Wed, Jan 05, 2005 at 11:04:20AM +0000, Ceri Davies said that
 > > > > On Wed, Jan 05, 2005 at 11:40:04AM +0100, Radko Keves wrote:
 > > > > > Tue, Jan 04, 2005 at 05:19:43PM +0000, Ceri Davies said that
 > > > > > > On Tue, Jan 04, 2005 at 04:44:26PM +0000, Radko Keves wrote:
 > > > > > > > >Description:
 > > > > > > >       dhclient is stoped twice in pccard_ether script
 > > > > > > >=20
 > > > > > > > first time in dhclient -rs ${interface}
 > > > > > > > second time in sh /etc/rc.d/dhclient stop
 > > > > > > > >How-To-Repeat:
 > > > > > > >       run pccard_ether <nic> <start|stop>
 > > > > > > > >Fix:
 > > > > > > > + diff -r -u /etc/pccard_ether /etc/pccard_ether-new
 > > > > > > > --- /etc/pccard_ether   Tue Jan  4 17:38:08 2005
 > > > > > > > +++ /etc/pccard_ether-new       Tue Jan  4 17:39:01 2005
 > > > > > > > @@ -65,8 +65,6 @@
 > > > > > > >         else
 > > > > > > >                 return
 > > > > > > >         fi
 > > > > > > > -       /sbin/dhclient -r ${interface}
 > > > > > > > -       rm -f ${pidfile}
 > > > > > > >         case ${startstop} in
 > > > > > > >         [Ss][Tt][Oo][Pp])
 > > > > > > >                 if [ -z "${_nlist}" ]; then
 > > > > > >=20
 > > > > >=20
 > > > > > this is another problem (as i see it)
 > > > > > everything is working but, script try to stop dhclient twice
 > > > > >=20
 > > > > > > Hi Radko,
 > > > > > >=20
 > > > > > > Are you actually removing the bge0 interface?
 > > > > > >=20
 > > > > > > If so, could you try this patch instead:
 > > > > > >=20
 > > > > > > Index: etc/pccard_ether
 > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > > > > > > RCS file: /home/ncvs/src/etc/pccard_ether,v
 > > > > > > retrieving revision 1.41
 > > > > > > diff -u -r1.41 pccard_ether
 > > > > > > --- etc/pccard_ether	6 Jun 2004 11:46:27 -0000	1.41
 > > > > > > +++ etc/pccard_ether	4 Jan 2005 14:18:52 -0000
 > > > > > > @@ -70,7 +70,7 @@
 > > > > > >  	case ${startstop} in
 > > > > > >  	[Ss][Tt][Oo][Pp])
 > > > > > >  		if [ -z "${_nlist}" ]; then
 > > > > > > -			sh `/etc/rc.d/dhclient start`
 > > > > > > +			sh /etc/rc.d/dhclient start
 > > > > > >  		else
 > > > > > >  			start_dhcp_keep_current
 > > > > > >  		fi
 > > > > > >=20
 > > > > >=20
 > > > > > your patch is working fine, but it looks like script is try to st=
 op
 > > > > > dhclient twice
 > > > >=20
 > > > > It shouldn't do with this patch.
 > > > >=20
 > > >=20
 > > > but:
 > > > su-2.05b# sh pccard_ether bge0 stop
 > > > dhclient not running? (check /var/run/dhclient.pid).
 > > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > >=20
 > > > ---
 > > >         /sbin/dhclient -r ${interface}
 > > >         rm -f ${pidfile}
 > > >         case ${startstop} in
 > > >         [Ss][Tt][Oo][Pp])
 > > >                 if [ -z "${_nlist}" ]; then
 > > >                          sh /etc/rc.d/dhclient stop
 > >=20
 > > That line should read "sh /etc/rc.d/dhclient start".
 >=20
 > why ?
 >=20
 > when you run:
 > /etc/pccard_ether bge0 stop
 >=20
 > you don't want to dhclient be started again, but to be stoped
 
 The first call to dhclient -r stops it, and then the next call starts it
 back up for the other interfaces.
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --X9hp/qFlD/MyfJCu
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB2/PUocfcwTS3JF8RAvJiAJ9ojnA7pBh81WoAiqeEkwyvkoVGRgCeI+du
 Sp5GIsa3OXbXMmY4J8NA3J0=
 =ybf7
 -----END PGP SIGNATURE-----
 
 --X9hp/qFlD/MyfJCu--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 15:05:42 +0100

 Wed, Jan 05, 2005 at 02:04:05PM +0000, Ceri Davies said that
 > > > > but:
 > > > > su-2.05b# sh pccard_ether bge0 stop
 > > > > dhclient not running? (check /var/run/dhclient.pid).
 > > > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > > > 
 > > > > ---
 > > > >         /sbin/dhclient -r ${interface}
 > > > >         rm -f ${pidfile}
 > > > >         case ${startstop} in
 > > > >         [Ss][Tt][Oo][Pp])
 > > > >                 if [ -z "${_nlist}" ]; then
 > > > >                          sh /etc/rc.d/dhclient stop
 > > > 
 > > > That line should read "sh /etc/rc.d/dhclient start".
 > > 
 > > why ?
 > > 
 > > when you run:
 > > /etc/pccard_ether bge0 stop
 > > 
 > > you don't want to dhclient be started again, but to be stoped
 > 
 > The first call to dhclient -r stops it, and then the next call starts it
 > back up for the other interfaces.
 > 
 
 this is not working, because in my case it started the same interface as
 i ask to stop
 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 14:16:18 +0000

 --zvmqw4jX2vbPsMQB
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 03:05:42PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 02:04:05PM +0000, Ceri Davies said that
 > > > > > but:
 > > > > > su-2.05b# sh pccard_ether bge0 stop
 > > > > > dhclient not running? (check /var/run/dhclient.pid).
 > > > > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > > > >=20
 > > > > > ---
 > > > > >         /sbin/dhclient -r ${interface}
 > > > > >         rm -f ${pidfile}
 > > > > >         case ${startstop} in
 > > > > >         [Ss][Tt][Oo][Pp])
 > > > > >                 if [ -z "${_nlist}" ]; then
 > > > > >                          sh /etc/rc.d/dhclient stop
 > > > >=20
 > > > > That line should read "sh /etc/rc.d/dhclient start".
 > > >=20
 > > > why ?
 > > >=20
 > > > when you run:
 > > > /etc/pccard_ether bge0 stop
 > > >=20
 > > > you don't want to dhclient be started again, but to be stoped
 > >=20
 > > The first call to dhclient -r stops it, and then the next call starts it
 > > back up for the other interfaces.
 >=20
 > this is not working, because in my case it started the same interface as
 > i ask to stop
 
 Then it is not a removable interface and pccard_ether is the wrong
 script to be using.
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --zvmqw4jX2vbPsMQB
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB2/ayocfcwTS3JF8RArtVAJ9gFyNQP2CEF7cjv3VpiTTGbqVfrACcCwrm
 HXixqyZTpQ1xfYyDNsD5L34=
 =eIqS
 -----END PGP SIGNATURE-----
 
 --zvmqw4jX2vbPsMQB--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 15:17:54 +0100

 Wed, Jan 05, 2005 at 02:16:18PM +0000, Ceri Davies said that
 > On Wed, Jan 05, 2005 at 03:05:42PM +0100, Radko Keves wrote:
 > > Wed, Jan 05, 2005 at 02:04:05PM +0000, Ceri Davies said that
 > > > > > > but:
 > > > > > > su-2.05b# sh pccard_ether bge0 stop
 > > > > > > dhclient not running? (check /var/run/dhclient.pid).
 > > > > > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > > > > > 
 > > > > > > ---
 > > > > > >         /sbin/dhclient -r ${interface}
 > > > > > >         rm -f ${pidfile}
 > > > > > >         case ${startstop} in
 > > > > > >         [Ss][Tt][Oo][Pp])
 > > > > > >                 if [ -z "${_nlist}" ]; then
 > > > > > >                          sh /etc/rc.d/dhclient stop
 > > > > > 
 > > > > > That line should read "sh /etc/rc.d/dhclient start".
 > > > > 
 > > > > why ?
 > > > > 
 > > > > when you run:
 > > > > /etc/pccard_ether bge0 stop
 > > > > 
 > > > > you don't want to dhclient be started again, but to be stoped
 > > > 
 > > > The first call to dhclient -r stops it, and then the next call starts it
 > > > back up for the other interfaces.
 > > 
 > > this is not working, because in my case it started the same interface as
 > > i ask to stop
 > 
 > Then it is not a removable interface and pccard_ether is the wrong
 > script to be using.
 > 
 
 # grep bge0 /etc/rc.conf 
 + grep bge0 /etc/rc.conf
 ifconfig_bge0="DHCP"
 removable_interfaces="bge0" # Removable network
 
 
 interface is setuped as removable
 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 14:25:05 +0000

 --pDtNmxPr5KTxcQ6Z
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 03:17:54PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 02:16:18PM +0000, Ceri Davies said that
 > > On Wed, Jan 05, 2005 at 03:05:42PM +0100, Radko Keves wrote:
 > > > Wed, Jan 05, 2005 at 02:04:05PM +0000, Ceri Davies said that
 > > > > > > > but:
 > > > > > > > su-2.05b# sh pccard_ether bge0 stop
 > > > > > > > dhclient not running? (check /var/run/dhclient.pid).
 > > > > > > > ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
 > > > > > > >=20
 > > > > > > > ---
 > > > > > > >         /sbin/dhclient -r ${interface}
 > > > > > > >         rm -f ${pidfile}
 > > > > > > >         case ${startstop} in
 > > > > > > >         [Ss][Tt][Oo][Pp])
 > > > > > > >                 if [ -z "${_nlist}" ]; then
 > > > > > > >                          sh /etc/rc.d/dhclient stop
 > > > > > >=20
 > > > > > > That line should read "sh /etc/rc.d/dhclient start".
 > > > > >=20
 > > > > > why ?
 > > > > >=20
 > > > > > when you run:
 > > > > > /etc/pccard_ether bge0 stop
 > > > > >=20
 > > > > > you don't want to dhclient be started again, but to be stoped
 > > > >=20
 > > > > The first call to dhclient -r stops it, and then the next call star=
 ts it
 > > > > back up for the other interfaces.
 > > >=20
 > > > this is not working, because in my case it started the same interface=
  as
 > > > i ask to stop
 > >=20
 > > Then it is not a removable interface and pccard_ether is the wrong
 > > script to be using.
 > >=20
 >=20
 > # grep bge0 /etc/rc.conf=20
 > + grep bge0 /etc/rc.conf
 > ifconfig_bge0=3D"DHCP"
 > removable_interfaces=3D"bge0" # Removable network
 >=20
 >=20
 > interface is setuped as removable
 
 You misunderstand.  "pccard_ether foo0 stop" is intended to be run when
 the foo0 interface is removed from the system.  If you are running it
 without removing the interface from the system then strange things will
 happen, as it goes to lengths to ensure that only the interface being
 removed from the system is affected by the removal.
 
 If you want to shutdown an interface without removing it from the system
 then "ifconfig foo0 down" should be enough.
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --pDtNmxPr5KTxcQ6Z
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB2/jBocfcwTS3JF8RAmGoAJ0SBRanPty6gJezHiL61JPds5qz/gCgw8nv
 9z11S32T2ED1slLXH6q4W6A=
 =Kt7e
 -----END PGP SIGNATURE-----
 
 --pDtNmxPr5KTxcQ6Z--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 15:36:01 +0100

 Wed, Jan 05, 2005 at 02:25:05PM +0000, Ceri Davies said that
 > You misunderstand.  "pccard_ether foo0 stop" is intended to be run when
 > the foo0 interface is removed from the system.  If you are running it
 > without removing the interface from the system then strange things will
 > happen, as it goes to lengths to ensure that only the interface being
 > removed from the system is affected by the removal.
 > 
 > If you want to shutdown an interface without removing it from the system
 > then "ifconfig foo0 down" should be enough.
 
 i understand, but there is no check if interface was removed from system
 
 is it okay ?
 
 
 > 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 14:57:29 +0000

 --sF6X0tUrUrSWNIfp
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 03:36:01PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 02:25:05PM +0000, Ceri Davies said that
 > > You misunderstand.  "pccard_ether foo0 stop" is intended to be run when
 > > the foo0 interface is removed from the system.  If you are running it
 > > without removing the interface from the system then strange things will
 > > happen, as it goes to lengths to ensure that only the interface being
 > > removed from the system is affected by the removal.
 > >=20
 > > If you want to shutdown an interface without removing it from the system
 > > then "ifconfig foo0 down" should be enough.
 >=20
 > i understand, but there is no check if interface was removed from system
 >=20
 > is it okay ?
 
 Yes.  Since this is normally run from usbd or devd, the interface will
 have been removed and the script can assume that it is gone.  That's the
 theory that the pccard_ether script is written around, it seems.
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --sF6X0tUrUrSWNIfp
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB3ABZocfcwTS3JF8RAg/QAKDHTaeodYr+YJ9UPtqwmBbJ+7geHQCfSOHR
 TrA6ywGNT7bqROuYhR/d+NU=
 =v2wS
 -----END PGP SIGNATURE-----
 
 --sF6X0tUrUrSWNIfp--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 16:02:38 +0100

 Wed, Jan 05, 2005 at 02:57:29PM +0000, Ceri Davies said that
 > Yes.  Since this is normally run from usbd or devd, the interface will
 > have been removed and the script can assume that it is gone.  That's the
 > theory that the pccard_ether script is written around, it seems.
 > 
 
 Yes, theoreticaly, but there is no manpage for pccard_ether and no
 description which said, do not run this script manualy :-) 
 
 So some check maybe can be usefull for people as myself, whose try it to
 run manualy and don't do misunderstandings.
 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]

From: Ceri Davies <ceri@submonkey.net>
To: Radko Keves <rado@daemon.sk>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 15:07:46 +0000

 --sTC4Ri5uc2u6z9Yo
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jan 05, 2005 at 04:02:38PM +0100, Radko Keves wrote:
 > Wed, Jan 05, 2005 at 02:57:29PM +0000, Ceri Davies said that
 > > Yes.  Since this is normally run from usbd or devd, the interface will
 > > have been removed and the script can assume that it is gone.  That's the
 > > theory that the pccard_ether script is written around, it seems.
 > >=20
 >=20
 > Yes, theoreticaly, but there is no manpage for pccard_ether and no
 > description which said, do not run this script manualy :-)=20
 >=20
 > So some check maybe can be usefull for people as myself, whose try it to
 > run manualy and don't do misunderstandings.
 
 It works ok if you run it manually, so long as the interface has
 actually been removed.  I'll add a comment to the script or something;
 does that sound ok?
 
 Ceri
 --=20
 Only two things are infinite, the universe and human stupidity, and I'm
 not sure about the former.			  -- Einstein (attrib.)
 
 --sTC4Ri5uc2u6z9Yo
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFB3ALCocfcwTS3JF8RAiXtAJ9eBIQ+eUcHFfAHjVlLfZ8+2B4JnwCfdwAn
 TeDWb2kYy9uRdG+wgP7V6XI=
 =KOXf
 -----END PGP SIGNATURE-----
 
 --sTC4Ri5uc2u6z9Yo--

From: Radko Keves <rado@daemon.sk>
To: Ceri Davies <ceri@submonkey.net>
Cc:  
Subject: Re: bin/75808: dhclient is stoped twice in pccard_ether script
Date: Wed, 5 Jan 2005 16:09:32 +0100

 Wed, Jan 05, 2005 at 03:07:46PM +0000, Ceri Davies said that
 > 
 > It works ok if you run it manually, so long as the interface has
 > actually been removed.  I'll add a comment to the script or something;
 > does that sound ok?
 > 
 
 It's on you, but i think so.
 
 But i still pefer to add some check to the script, it is much more clean
 way.
 
 
 > Ceri
 > -- 
 > Only two things are infinite, the universe and human stupidity, and I'm
 > not sure about the former.			  -- Einstein (attrib.)
 
 
 
 -- 
 You wouldn't take candy from strangers, would you?
 [msdn]
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Mon Jan 17 15:43:20 GMT 2005 
State-Changed-Why:  
Corrected with r1.43 of pccard_ether.  Thanks again for your help in 
getting to the bottom of this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75808 
>Unformatted:
