Skip to content

Commit

Permalink
自动挂载 libcomposite 模块
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeng-git committed Sep 26, 2024
1 parent 7e6cb6d commit ced23f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN cp /tmp/lib/* /lib/*-linux-*/ \

RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list.d/debian.sources \
&& apt-get update \
&& apt-get install -y --no-install-recommends libxkbcommon-x11-0 nginx tesseract-ocr tesseract-ocr-eng tesseract-ocr-chi-sim iptables sudo curl \
&& apt-get install -y --no-install-recommends libxkbcommon-x11-0 nginx tesseract-ocr tesseract-ocr-eng tesseract-ocr-chi-sim iptables sudo curl kmod \
libmicrohttpd12 libjansson4 libssl3 libsofia-sip-ua0 libglib2.0-0 libopus0 libogg0 libcurl4 libconfig9 libusrsctp2 libwebsockets17 libnss3 libasound2 \
&& rm -rf /var/lib/apt/lists/*

Expand Down
5 changes: 3 additions & 2 deletions build/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ fi

#Trying usb_gadget
if [ "$OTG" == "1" ]; then
echo "Trying OTG Port..." \
&& python -m kvmd.apps.otg start \
echo "Trying OTG Port..."
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 \
&& ln -s /dev/hidg0 /dev/kvmd-hid-keyboard \
|| echo -e "${RED}OTG Port mount failed.${NC}"
Expand Down

0 comments on commit ced23f2

Please sign in to comment.