From 6707cb993224089bc1c3eb5ae1be671bd0026cb4 Mon Sep 17 00:00:00 2001 From: mofeng-git Date: Fri, 11 Oct 2024 11:49:07 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E6=95=B4=E5=90=88=E5=8C=85=E8=A1=A5?= =?UTF-8?q?=E5=85=A8=20python3-hid=20=E4=BE=9D=E8=B5=96=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20amd64=20=E6=9E=B6=E6=9E=84=20docker=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=90=AF=E7=94=A8=20MSD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build_img.sh | 9 +-------- build/init.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/build/build_img.sh b/build/build_img.sh index a44736b5..f889a2c7 100644 --- a/build/build_img.sh +++ b/build/build_img.sh @@ -79,7 +79,7 @@ instal_one-kvm() { apt update \ && apt install -y python3-aiofiles python3-aiohttp python3-appdirs python3-asn1crypto python3-async-timeout \ python3-bottle python3-cffi python3-chardet python3-click python3-colorama python3-cryptography python3-dateutil \ - python3-dbus python3-dev python3-hidapi python3-idna python3-libgpiod python3-mako python3-marshmallow python3-more-itertools \ + python3-dbus python3-dev python3-hidapi python3-hid python3-idna python3-libgpiod python3-mako python3-marshmallow python3-more-itertools \ python3-multidict python3-netifaces python3-packaging python3-passlib python3-pillow python3-ply python3-psutil \ python3-pycparser python3-pyelftools python3-pyghmi python3-pygments python3-pyparsing python3-requests \ python3-semantic-version python3-setproctitle python3-setuptools python3-six python3-spidev python3-systemd \ @@ -223,10 +223,3 @@ case $1 in echo "Do no thing." ;; esac - - -#开发计划 -#深度适配私家云二代 -#修改dtb 修复玩客云/sys/class/usb_role不存在 -#x86 禁用MSD :通过docker环境变量判断替换配置文件 -#添加msd文件夹配置选项 diff --git a/build/init.sh b/build/init.sh index 9509ee0a..c7e5450d 100755 --- a/build/init.sh +++ b/build/init.sh @@ -100,6 +100,11 @@ EOF echo -e "${GREEN}One-KVM OTG is enabled.${NC}" sed -i "s/ch9329/otg/g" /etc/kvmd/override.yaml sed -i "s/device: \/dev\/ttyUSB0//g" /etc/kvmd/override.yaml + if [ "$NOMSD" == 1 ]; then + echo -e "${GREEN}One-KVM MSD is disabled.${NC}" + else + sed -i "s/#type: otg/type: otg/g" /etc/kvmd/override.yaml + fi fi #if [ ! -z "$SHUTDOWNPIN" ! -z "$REBOOTPIN" ]; then @@ -119,16 +124,11 @@ EOF else echo -e "${YELLOW} USERNAME and PASSWORD environment variables is not set, using defalut(admin/admin).${NC}" fi - - if [ "$NOMSD" == 1 ]; then - echo -e "${GREEN}One-KVM MSD is disabled.${NC}" - else - sed -i "s/#type: otg/type: otg/g" /etc/kvmd/override.yaml - fi touch /etc/kvmd/.init_flag fi + #Trying usb_gadget if [ "$OTG" == "1" ]; then echo "Trying OTG Port..."