From 758ba42838fcb3d85373170fa81e87ade01ccf0b Mon Sep 17 00:00:00 2001 From: mofeng-git Date: Sun, 29 Sep 2024 23:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=20OTG=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/init.sh | 1 + configs/kvmd/clean_when_exit.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/init.sh b/build/init.sh index 1df0ed56..ddd946dc 100755 --- a/build/init.sh +++ b/build/init.sh @@ -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 \ diff --git a/configs/kvmd/clean_when_exit.sh b/configs/kvmd/clean_when_exit.sh index b505070d..55cf0747 100755 --- a/configs/kvmd/clean_when_exit.sh +++ b/configs/kvmd/clean_when_exit.sh @@ -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 }