Skip to content

Commit

Permalink
config🔧: default ip addr 192.168.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxu52 committed Mar 10, 2024
1 parent c13cc97 commit a8fc9e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h3c-nx30pro/hanwckf-immortalwrt/part3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#limitations under the License.

echo '修改主机名'
sed -i "s/hostname='ImmortalWrt'/hostname='RAX3000M'/g" package/base-files/files/bin/config_generate
sed -i "s/hostname='ImmortalWrt'/hostname='NX30-Pro'/g" package/base-files/files/bin/config_generate
cat package/base-files/files/bin/config_generate |grep hostname=
echo '=========Alert hostname OK!========='

echo '修改默认IP'
sed -i 's/ipad=${ipaddr:-"192.168.1.1"}/ipad=${ipaddr:-"192.168.7.1"}/g' package/base-files/files/bin/config_generate
sed -i 's/ipad=${ipaddr:-"192.168.1.1"}/ipad=${ipaddr:-"192.168.5.1"}/g' package/base-files/files/bin/config_generate
sed -i 's/addr_offset=2/addr_offset=8/g' package/base-files/files/bin/config_generate
sed -i 's/${ipaddr:-"192.168.$((addr_offset++)).1"}/${ipaddr:-"192.168.$((addr_offset++)).1"}/g' package/base-files/files/bin/config_generate
cat package/base-files/files/bin/config_generate |grep hostname=
Expand Down

0 comments on commit a8fc9e0

Please sign in to comment.