25 lines
775 B
Bash
25 lines
775 B
Bash
|
usbdir='/home/belar/.scripts'
|
||
|
|
||
|
if [ $# -eq 0 ]
|
||
|
then
|
||
|
echo "No arguments supplied"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if [ $1 == 'attach' ]
|
||
|
then
|
||
|
virsh attach-device WinVM --file $usbdir/usb_lily58.xml --live
|
||
|
virsh attach-device WinVM --file $usbdir/usb_logitech_g502.xml --live
|
||
|
#virsh attach-device WinVM --file $usbdir/usb_scarlett_solo.xml --live
|
||
|
#virsh attach-device WinVM --file $usbdir/usb_ax200_bluetooth.xml --live
|
||
|
fi
|
||
|
|
||
|
if [ $1 == 'detach' ]
|
||
|
then
|
||
|
virsh detach-device WinVM --file $usbdir/usb_lily58.xml --live
|
||
|
virsh detach-device WinVM --file $usbdir/usb_logitech_g502.xml --live
|
||
|
#virsh detach-device WinVM --file $usbdir/usb_scarlett_solo.xml --live
|
||
|
#virsh detach-device WinVM --file $usbdir/usb_ax200_bluetooth.xml --live
|
||
|
fi
|
||
|
|