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
Changed initscripts invocation in 20020826-r2, including the --quiet. Works
fine, and complains less
on the whole.