samba: bump PKG_RELEASE
[openwrt/openwrt.git] / target / linux / brcm47xx / base-files / lib / preinit / 15_set_preinit_interface_brcm
1 #!/bin/sh
2
3 preinit_ip() {
4 # if the preinit interface isn't specified and ifname is set in
5 # preinit.arch use that interface
6 if [ -z "$pi_ifname" ]; then
7 pi_ifname=$ifname
8 fi
9
10 [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
11 ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
12
13 local try=0;
14 while [ $((try++)) -le 5 ] && [ ! "$(cat /sys/class/net/$pi_ifname/operstate)" = "up" ]; do sleep 1; done
15 }
16 }