Auto execute usbconfig at boot to enable USB NIC
-
Hi everyone!
In order to enable the system to automatically reboot and startup properly after a shutdown
I would like to execute the following commandusbconfig -d ugen0.2 set_config 1
everytime the system boots.I tried to include something like this
<shellcmd>usbconfig -d ugen0.2 set_config 1<shellcmd>
right above<system>
in theconfig.xml
file. However it triggered lots of errors during boot so that I had to remove the line again.Any help is very much appreciated. Thanks Grillmeister
PS. I know that USB NICs are not a prefered solution but I need to stick with them because of the lack of alterntives for my Intel NUC.
-
You probably can do something like that but FreeBSD has a better solution built in for setting the config index on a device:
https://www.freebsd.org/cgi/man.cgi?query=usb_quirk#LOADER_TUNABLESo get the product and vendor IDs from your device using
usbconfig -d ugen0.2 dump_device_desc
then create the file /boot/loader.conf.local and add to it:hw.usb.quirk.0="VID PID 0 0xffff UQ_CFG_INDEX_1"
Then that device will always come up with config index 1 whenever it's attached.
Steve