项目

一般

简介

错误 #5299

os版本为2.0.2时,针对OS系统较老的环境/yzmm/gNB_config.sh文件内容需要更新

杨 凯大约 2 个月 之前添加. 更新于 4 天 之前.

状态:
已解决
优先级:
一般
指派给:
开始日期:
2026-05-19
计划完成日期:
% 完成:

0%

预期时间:
问题归属:
DRV
发现问题版本:
Rel_3.2.2
目标解决问题版本:
Rel_3.2.2

描述

os版本为2.0.2时,针对OS系统较老的环境/yzmm/gNB_config.sh文件内容需要更新
备注:
旧的文件:
root@driver:~# cat /yzmm/gNB_config.sh
ifconfig eth0 192.168.68.236 broadcast 192.168.68.255 netmask 255.255.255.0
ifconfig eth0 down
ifconfig eth0 hw ether b2:00:62:76:f2:36
ifconfig eth0 up
ip route add default via 192.168.68.1

#ifconfig eth2 192.168.62.236 broadcast 192.168.62.255 netmask 255.255.255.0
#ifconfig eth2 down
#ifconfig eth2 hw ether b2:22:62:76:f2:36
#ifconfig eth2 up
#ip route add default via 192.168.62.1

新的文件:
root@driver:/yzmm# cat gNB_config.sh
#!/bin/bash

ifconfig eth0 192.168.62.247 broadcast 192.168.255.255 netmask 255.255.255.0
ifconfig eth0 down

mac=""
result=$(eeprom_rw get mac)
if [ $result = "error" ]; then
echo "eeprom read mac error"
else
mac=$(echo $result | awk -F= '{print $2}')
ifconfig eth0 hw ether $mac
ifconfig eth0 up
ip route add default via 192.168.62.1

fi

hex_str=$(echo "$mac" | tr -d ':')
dec_num=$((16#$hex_str))
new_dec=$((dec_num + 1))
new_hex=$(printf "%012X" $new_dec)
new_mac=$(echo "$new_hex" | sed -E 's/(..)/\1:/g; s/:$//')

echo "MAC: $mac"
echo "MAC1: $new_mac"

ifconfig eth2 192.168.68.247 broadcast 192.168.255.255 netmask 255.255.255.0
ifconfig eth2 down
ifconfig eth2 hw ether $new_mac
ifconfig eth2 up
#ip route add default via 192.168.2.254
hwtype=$(/usr/bin/eeprom_rw get type |awk -F'=' '{print $2}')
echo "==================>${hwtype}"

if [ ${hwtype}x = "EVMT4"x ]; then
if [ -d /yzmm/gnb ]; then
cp /yzmm/gnb/baseService/baseservice.service /lib/systemd/system/
cp /yzmm/gnb/logwriter/logwriter.service /lib/systemd/system/
cp /yzmm/gnb/sysrepoCfgTool/sysrepocfgtool.service /lib/systemd/system/
cp /yzmm/gnb/agent/gnb_agent.service /lib/systemd/system/
cp /yzmm/gnb/du/bin/du.service /lib/systemd/system/
cp /yzmm/gnb/cu/bin/cu.service /lib/systemd/system/
systemctl enable gnb_agent.service
systemctl enable baseservice.service
systemctl daemon-reload
sleep 1
systemctl restart gnb_agent.service
systemctl restart baseservice.service
fi
fi
建议升级时替换以新的gNB_config.sh为准


文件

历史记录

#1

战 弋戈 更新于 大约一个月 之前

  • 状态新建 变更为 进行中
#2

战 弋戈 更新于 大约一个月 之前

  • 状态进行中 变更为 审视
  • 指派给战 弋戈 变更为 杨 凯
#3

战 弋戈 更新于 30 天 之前

升级时, 检查gNB_config.sh 文件, 最后没有发现后边的拷贝动作, 会将最后的那段内容填入gNB_config.sh 文件的最后。

#4

杨 凯 更新于 30 天 之前

现在就是两个问题:
一种是本身没这个文件的

一种是有这个文件但没上面那段CP的

都覆盖到位了吧

这个1.0.10版本和2.0.3版本都需考虑

#5

战 弋戈 更新于 4 天 之前

  • 状态审视 变更为 已解决

导出 Atom PDF