ASInstaller/debug_install_net.sh

16 lines
432 B
Bash
Raw Permalink Normal View History

2023-03-14 20:00:17 +08:00
#/sbin/bin
local-install nic
local-install vim.tiny
hw-detect
local-install ssh
2023-03-30 21:37:43 +08:00
local-install awk
eth0=`ip link show | mawk '/^[0-9]+:/ {print substr($2, 1, length($2)-1)}' |grep -v lo`
2023-03-16 19:54:59 +08:00
echo $eth0
echo "ip link set $eth0 up"
echo "ip addr add 10.10.20.$1/24 dev $eth0"
echo "ip route add default via 10.10.20.201 dev $eth0"
ip link set $eth0 up
ip addr add 10.10.20.$1/24 dev $eth0
ip route add default via 10.10.20.201 dev $eth0