[BusyBox] Problems with scripts

Asier Tamayo asier.tamayo at ona-electroerosion.com
Thu Jan 29 12:08:09 UTC 2004


Hello all,

I'm new to the mailing list, therefore don't blame on me if I'm asking a
silly question.

My problem is with a script file (/sbin/hotplug). I've changed the file in
order to show the bug:
	#! /bin/sh
	#
	#
	echo 1:: $ACTION :: >>/tmp/usb_hotplug.log
	echo 2:: $ACTION :: >>/tmp/usb_hotplug.log
	echo 2:: $ACTION :: >>/tmp/usb_hotplug.log
	echo 2:: $ACTION :: >>/tmp/usb_hotplug.log
	if [ "$ACTION" = "register" ]
	then
		echo register:: $ACTION :: >>/tmp/usb_hotplug.log
		# No hacemos nada
		exit
	fi
	echo 2:: $ACTION :: >>/tmp/usb_hotplug.log
	exit

/sbin/hotplug is called whenever I connect and disconnect an USB device, and
the following lines appear:
	1:: add ::
	2:: add ::
	2:: add ::
	2:: add ::
	2:: add ::
	1:: remove ::
	2:: remove ::
	2:: remove ::
	2:: remove ::
	2:: remove ::

My problem is that from time to time (1 out of 7) I can see a line as the
following one:
	register:: add :: or register:: remove ::

It should be impossible!! If I call the /sbin/hotplug from a shell in a
telnet, it never happens!!

Does anyone know where the problem is? I'm using BusyBox version 0.60.2.
Does anyone know if this possible bug has already been corrected in the
latest versions?

Thanks in advance,

Asier.



More information about the busybox mailing list