내 Debian Linux 시스템에 새로운 systemd 로그 메시지가 나타납니다. 다음과 같이:
Nov 30 20:41:42 beaglebone sh[628]: autoconfigure_usb0.sh: g_multi: waiting for /sys/class/net/usb0/
이 메시지는 몇 초마다 반복되는데 원인이 무엇인지 모르겠습니다. 온라인에서 이 메시지에 대한 정보를 찾을 수 없습니다. 일부 서비스가 이미 스크립트를 실행하고 있는 것 같지만 autoconfigure_usb0.sh
분명히 작동하지 않습니다. 이는 네트워크 인터페이스와 관련이 있습니다. 현재 인터넷 접속이 가능한 Wi-Fi에 연결되어 있습니다. 스크립트 autoconfigure_usb0.sh
는 다음과 같습니다.
debian@beaglebone:~$ cat /usr/bin/autoconfigure_usb0.sh
#!/bin/bash
#
# Copyright (c) 2017 David Lechner <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
if [ -f /etc/default/bb-boot ] ; then
. /etc/default/bb-boot
fi
#Backup...
if [ "x${USB_CONFIGURATION}" = "x" ] ; then
USB0_ADDRESS=192.168.7.2
USB0_NETMASK=255.255.255.252
fi
#
# Auto-configuring the usb1 network interface:
#
# usb1 is the CDC/ECM gadget connection. It is managed by ConnMan and uses
# tethering so that it serves a DHCP address to attached hosts. The IPv4 subnet
# used by ConnMan is not consistent, so hosts should connect using the mDNS
# name (beaglebone.local) instead of an IP address.
#
until [ -d /sys/class/net/usb0/ ] ; do
sleep 1
echo "autoconfigure_usb0.sh: g_multi: waiting for /sys/class/net/usb0/"
done
# gadget is not supported by ConnMan provisioning files, so we have to do this
# the ugly way. Advanced users can comment these line to gain full control of
# the usb1 network interface.
#connmanctl enable gadget >/dev/null 2>&1
#connmanctl tether gadget on >/dev/null 2>&1
# if there is any pre-existing config for usb1, use that;
# otherwise use a static default
grep -rqE '^\s*iface usb0 inet' /etc/network/interfaces* && /sbin/ifup usb0 \
|| /sbin/ifconfig usb0 ${USB0_ADDRESS} netmask ${USB0_NETMASK} \
|| true
이 분야에 더 많은 경험이 있는 사람이 여기서 무슨 일이 일어나고 있는지 파악하는 데 도움이 되기를 바랍니다. 감사해요!
편집하다:다음 명령의 출력은 다음과 같습니다.
debian@beaglebone:~$ ls /sys/class/net
can0 can1 lo SoftAp0 wlan0