Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbbd41b5

Browse files
committed
usb_passthrough_frontend: ensure config has usb_passthrough
1 parent856dd0e commitbbd41b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎bvm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,13 @@ usb_passthrough_frontend() { #help the user add USB devices to be forwarded to t
693693
#no devices specified, reset line to default and comment it out
694694
sed -i"s/^usb_passthrough=.*/#usb_passthrough='05dc:a720'/g""$vmdir/bvm-config"
695695
else
696+
#First make sure config file has usb_passthrough section. If not, add it.
697+
grep -q usb_passthrough"$vmdir/bvm-config"||echo"
698+
#USB forwarding: uncomment this line for the VM to have direct access to a USB device.
699+
#usb_passthrough='05dc:a720'
700+
#Replace 05dc:a720 with the value you see, for the device you want, from the output of lsusb
701+
#For multiple devices, keep it in those quotes, but separate each one with a space character.">>"$vmdir/bvm-config"
702+
696703
#edit config file to uncomment the line and replace it with user-selected list of usb devices
697704
sed -i"s/^#usb_passthrough=/usb_passthrough=/g ; s/^usb_passthrough=.*/usb_passthrough='$(echo"$output"| grep.| tr'\n'''| sed's/ $//g')'/g""$vmdir/bvm-config"
698705
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp