[modify] make mavvlan take effect by putting this action 20s after NIC setting
This commit is contained in:
parent
ce95c20bc4
commit
19f72612cd
@ -5,12 +5,13 @@
|
||||
/usr/bin/bash /opt/scripts/update/calibre.sh
|
||||
mv /opt/wd/99-Temp/shutdown /opt/wd/99-Temp/shutdown.old
|
||||
#==============================================================================
|
||||
/usr/bin/bash /opt/scripts/update/macvlan.sh
|
||||
#==============================================================================
|
||||
ip link set enp1s0 promisc on
|
||||
ip link set enp2s0 promisc on
|
||||
ip link set wlx90de80ca01ec promisc on
|
||||
#==============================================================================
|
||||
sleep 20
|
||||
/usr/bin/bash /opt/scripts/update/macvlan.sh
|
||||
#==============================================================================
|
||||
/usr/bin/bash /opt/scripts/update/jekyll_update.sh
|
||||
# /usr/bin/mount -t ext4 -w UUID="b7c2c4b8-bfde-479b-80bb-655432a433b8" /opt/wd
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
gateway=`ip route | head -n 1 | grep -Eow '([0-9]{1,3}.){3}[0-9]{1,3}'`
|
||||
for i in `seq 3`; do
|
||||
gateway=`ip route | head -n 1 | grep -Eow '([0-9]{1,3}.){3}[0-9]{1,3}'`
|
||||
[[ $gateway == '' ]] && { sleep 3; continue; }
|
||||
done
|
||||
[[ $gateway == '' ]] && exit 9
|
||||
|
||||
num1=`echo $gateway | awk -F '.' '{print $1}'`
|
||||
@ -16,7 +19,7 @@ done
|
||||
ip link add main2wrt link enp1s0 type macvlan mode bridge
|
||||
ip addr add $IP dev main2wrt
|
||||
ip link set main2wrt up
|
||||
ip route add $IP dev main2wrt
|
||||
ip route add 192.168.10.123 dev main2wrt
|
||||
|
||||
ip link set main2wrt promisc on
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user