cvs commit: LFS/bootscripts/contrib/init.d hotplug

Alexander E. Patrakov see at the.sig
Tue Jun 15 20:17:14 PDT 2004


winkie at linuxfromscratch.org wrote:
> winkie      04/06/15 10:11:09
> 
>   Modified:    bootscripts/contrib/init.d hotplug
>   Log:
>   Clean-up hotplugging script
And break it.
>   
>   Revision  Changes    Path
>   1.4       +14 -8     LFS/bootscripts/contrib/init.d/hotplug
>   
>   Index: hotplug
>   ===================================================================
>   RCS file: /home/cvsroot/LFS/bootscripts/contrib/init.d/hotplug,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- hotplug	3 Jun 2004 01:59:32 -0000	1.3
>   +++ hotplug	15 Jun 2004 16:11:09 -0000	1.4
>   @@ -7,28 +7,34 @@
>    . $rc_functions
>    
>    # Exit quietly if you do not have hotplug installed
>   -if [ ! -x /sbin/hotplug ]; then
>   -	exit 0
>   -fi
>   +[ -x /sbin/hotplug ] || exit 0
OK
>    
>    case "$1" in
>   -	start|restart|status)
>   -		# Set hotplug as the default manager of hotplug events
>   -		echo /sbin/hotplug > /proc/sys/kernel/hotplug
>   -
>   +	start|restart)
>    		echo "Loading modules for system devices..."
>    		for rc in /etc/hotplug/*.rc; do
>    			$rc $1
>    		done
>    		print_status success
>   +
>   +		# Set hotplug as the default manager of hotplug events
>   +		echo /sbin/hotplug > /proc/sys/kernel/hotplug
>    		;;

This way you lose all IEEE1394 hotplug events that come when pci.rc 
scripts detects the IEEE1394 controller. Please put echo /sbin/hotplug > 
/proc/sys/kernel/hotplug to the top, where it was.

>    	stop)
>   +		# Remove hotplug as the default manager of hotplug events
>   +		echo /bin/true > /proc/sys/kernel/hotplug
>   +
Not sure. I would rather put it to the bottom, and synchronize our 
sendsignals script with that, where we currently just 
"echo > /proc/sys/kernel/hotplug"
>    		echo "Unloading modules for system devices..."
>    		for rc in /etc/hotplug/*.rc; do
>   -			$rc $1
>   +			$rc stop
>    		done
>    		print_status success
>    		;;
>   +	status)
>   +		for rc in /etc/hotplug/*.rc; do
>   +			$rc status
>   +		done
>   +		;;
OK
>    	*)
>    		echo "Usage: $0 {start|stop|restart|status}"
>    		exit 1


-- 
Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr \!-: a-z | tr n .



More information about the lfs-book mailing list