Plan 9 from Bell Labs’s /usr/web/sources/plan9/rc/bin/usbstart

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# usbstart - start appropriate usb flavour
if(test -r '#u'/usb) {
	if(! test -r /dev/usb)
		bind -a '#u' /dev

	# /boot/boot may have started usbd, which starts all usb drivers
	if (! ps | grep -s ' usbd$')
		usb/usbd
}
if not if(test -r '#U'/usb0) {
	if(! test -r /dev/usb0)
		bind -a '#U' /dev

	# /boot/boot may have started usbd, usb/kb or usb/disk
	if (! ps | grep -s ' usbd$')
		usb/usbd
	usb/usbmouse -a 2
	if (! ps | grep -s ' kb$')
		usb/kb -k
	usb/usbaudio -s usbaudio.$sysname -V
	# usb/print
}
exit ''

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.