Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14175 - hotplug-20020401-r1 net unplug get wrong
Summary: hotplug-20020401-r1 net unplug get wrong
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-19 07:17 UTC by SUZUKI Youji
Modified: 2003-03-26 12:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SUZUKI Youji 2003-01-19 07:17:44 UTC
I tried usbdnet. I made /etc/init.d/net.usb0 copying from net.eth0, and modifing
stop() function only to do 'ebegin' and 'eend 0'. 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't executed).

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

I modified /etc/hotplug/net.agent to call /etc/init.d/net.$INTERFACE with
"--quiet" 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
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-21 09:12:50 UTC
Wout, this fine to add ?  Look ok to me.
Comment 2 Wout Mertens (RETIRED) gentoo-dev 2003-01-21 09:53:40 UTC
Looks fine to me as well. Can't test, though...
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-21 11:33:52 UTC
Oki, you taking, or who is semi official for hotplug ?
Comment 4 Wout Mertens (RETIRED) gentoo-dev 2003-03-19 08:31:50 UTC
I'll see what I can do. 
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-20 10:17:26 UTC
And?
Comment 6 Wout Mertens (RETIRED) gentoo-dev 2003-03-26 12:25:16 UTC
Changed initscripts invocation in 20020826-r2, including the --quiet. Works fine, and complains less 
on the whole.