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..."