coolsnowwolf e575061c57 Revert "move lean packages to my packages feed"
This reverts commit 510d2c3e466e953eba52c1a7c4e1d423ee10e21f.
2018-10-19 13:06:16 +08:00

17 lines
622 B
Bash

#!/bin/sh
[ "$(uci get syncdial.config.enabled)" = "1" ] && \
[ "$(uci get syncdial.config.old_frame)" = "1" ] && \
[ "$DEVICE" = "$(uci get network.wan.ifname)" ] && \
[ "$ACTION" = "ifup" ] && {
ifname=$(uci get network.wan.ifname)
wannum=$(uci get syncdial.config.wannum)
for i in $(seq 1 $wannum)
do
[ -d /sys/class/net/macvlan$i ] || {
ip link add link $ifname name macvlan$i type macvlan
ifconfig macvlan$i hw ether $(echo $(cat /sys/class/net/$ifname/address|awk -F ":" '{print $1":"$2":"$3":"$4":"$5":" }')$(echo "" | awk -F ":" '{printf("%X\n", 16+i);}' i=$i))
ifconfig macvlan$i up
}
done
}