胡增文 1 год назад
Родитель
Сommit
ce426b3275
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      init-per.sh

+ 3 - 3
init-per.sh

@@ -39,7 +39,7 @@ server_port = 7000
 
 [nvr-$proj]
 type = tcp
-local_ip = 192.168.6.200
+local_ip = 192.168.3.200
 local_port = 554 
 remote_port = 119$port
 
@@ -101,9 +101,9 @@ if ! grep -q "net.ipv6.conf.default.forwarding=1" /etc/sysctl.conf; then
 fi
 
 ip -o link show | awk -F': ' '{print $2}' | while read interface; do
-    # 处理192.168.6网段的网卡
+    # 处理192.168.3网段的网卡
     mac=$(ip link show dev "$interface" | awk '/link\/ether/ {print $2}')
-    ip=$(ip addr show dev "$interface" | awk '/inet 192.168.6/ {print $2}')
+    ip=$(ip addr show dev "$interface" | awk '/inet 192.168.3/ {print $2}')
     if [ -n "$ip" ] && [ -n "$mac" ]; then
         subnet=$(echo "$ip" | awk -F'/' '{print $1}' | awk -F'.' '{print $1"."$2"."$3}')
         echo "网卡名称: $interface,MAC地址: $mac,IP地址: $(echo $ip | cut -d '/' -f 1), subnet: $subnet"