16 lines
432 B
Bash
16 lines
432 B
Bash
#/sbin/bin
|
|
|
|
local-install nic
|
|
local-install vim.tiny
|
|
hw-detect
|
|
local-install ssh
|
|
local-install awk
|
|
eth0=`ip link show | mawk '/^[0-9]+:/ {print substr($2, 1, length($2)-1)}' |grep -v lo`
|
|
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
|