<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>14175</bug_id>
          
          <creation_ts>2003-01-19 07:17 0000</creation_ts>
          <short_desc>hotplug-20020401-r1 net unplug get wrong</short_desc>
          <delta_ts>2003-03-26 12:25:16 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>1.4_rc2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>suzuki-youji@my.email.ne.jp</reporter>
          <assigned_to>azarah@gentoo.org</assigned_to>
          <cc>wmertens@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>suzuki-youji@my.email.ne.jp</who>
            <bug_when>2003-01-19 07:17:44 0000</bug_when>
            <thetext>I tried usbdnet. I made /etc/init.d/net.usb0 copying from net.eth0, and modifing
stop() function only to do &apos;ebegin&apos; and &apos;eend 0&apos;. I modified /etc/conf.d/net to
ifconfig for usb0.
Hot-plugging is OK. But, after hot-unplugging, /mnt/.init.d/started/net.usb0
still exists, then next hot-plugging failed.(ifconfig isn&apos;t executed).

This is because, in net.usb0&apos;s stop() function &quot;eend 0&quot; returns &quot;1&quot; , then
stop() returns &quot;1&quot; , so /sbin/runscript.sh remake /mnt/.initd/started/net.usb0.
The reason why &quot;eend 0&quot; returns &quot;1&quot; is that QUIET_STDOUT is not &apos;yes&apos; so echo to
stdout is failed.

I modified /etc/hotplug/net.agent to call /etc/init.d/net.$INTERFACE with
&quot;--quiet&quot; option, then this problem was fixed.

*** ./net.agent.ORIG    Sun Jan 19 18:20:20 2003
--- ./net.agent Sun Jan 19 19:42:53 2003
***************
*** 43,49 ****
            # handle gentoo init script style
            if [ -x /etc/init.d/net.$INTERFACE ]; then
                debug_mesg invoke /etc/init.d/net.$INTERFACE start
!               exec /etc/init.d/net.$INTERFACE start
            # RedHat and similar
            elif [ -x /sbin/ifup ]; then
                debug_mesg invoke ifup $INTERFACE
--- 43,49 ----
            # handle gentoo init script style
            if [ -x /etc/init.d/net.$INTERFACE ]; then
                debug_mesg invoke /etc/init.d/net.$INTERFACE start
!               exec /etc/init.d/net.$INTERFACE --quiet start
            # RedHat and similar
            elif [ -x /sbin/ifup ]; then
                debug_mesg invoke ifup $INTERFACE
***************
*** 67,73 ****
            # handle gentoo init script style
            if [ -x /etc/init.d/net.$INTERFACE ]; then
                debug_mesg invoke /etc/init.d/net.$INTERFACE stop
!               exec /etc/init.d/net.$INTERFACE stop
            # RedHat and similar
            elif [ -x /sbin/ifdown ]; then
                debug_mesg invoke ifdown $INTERFACE
--- 67,73 ----
            # handle gentoo init script style
            if [ -x /etc/init.d/net.$INTERFACE ]; then
                debug_mesg invoke /etc/init.d/net.$INTERFACE stop
!               exec /etc/init.d/net.$INTERFACE --quiet stop
            # RedHat and similar
            elif [ -x /sbin/ifdown ]; then
                debug_mesg invoke ifdown $INTERFACE</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azarah@gentoo.org</who>
            <bug_when>2003-01-21 09:12:50 0000</bug_when>
            <thetext>Wout, this fine to add ?  Look ok to me.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wmertens@gentoo.org</who>
            <bug_when>2003-01-21 09:53:40 0000</bug_when>
            <thetext>Looks fine to me as well. Can&apos;t test, though...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azarah@gentoo.org</who>
            <bug_when>2003-01-21 11:33:52 0000</bug_when>
            <thetext>Oki, you taking, or who is semi official for hotplug ?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wmertens@gentoo.org</who>
            <bug_when>2003-03-19 08:31:50 0000</bug_when>
            <thetext>I&apos;ll see what I can do. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azarah@gentoo.org</who>
            <bug_when>2003-03-20 10:17:26 0000</bug_when>
            <thetext>And?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wmertens@gentoo.org</who>
            <bug_when>2003-03-26 12:25:16 0000</bug_when>
            <thetext>Changed initscripts invocation in 20020826-r2, including the --quiet. Works fine, and complains less 
on the whole. 
 </thetext>
          </long_desc>
      
    </bug>

</bugzilla>