mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
增强 OTG 模式容错
This commit is contained in:
parent
f222926d85
commit
758ba42838
@ -125,6 +125,7 @@ fi
|
||||
#Trying usb_gadget
|
||||
if [ "$OTG" == "1" ]; then
|
||||
echo "Trying OTG Port..."
|
||||
rm -r /run/kvmd/otg
|
||||
modprobe libcomposite || echo -e "${RED}Linux libcomposite module modprobe failed.${NC}"
|
||||
python -m kvmd.apps.otg start \
|
||||
&& ln -s /dev/hidg1 /dev/kvmd-hid-mouse \
|
||||
|
||||
@ -10,8 +10,8 @@ cleanup() {
|
||||
if [ "$OTG" == "1" ]; then
|
||||
echo "Trying exit OTG Port..." \
|
||||
&& python -m kvmd.apps.otg stop \
|
||||
&& rm -r /run/kvmd/otg \
|
||||
|| echo -e "${RED}Failed to exit OTG Port${NC}"
|
||||
rm -r /run/kvmd/otg
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user