1
0
This repository has been archived on 2025-01-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
alacn1_pace_v5471/squashfs-root/etc/bewan/scripts/gvt-ipconf-blink
Anderson Luiz Alves 0464e230c1 stock 103961
2017-07-30 16:48:04 -03:00

20 lines
638 B
Bash
Executable File

#!/bin/sh
# We want to know when we gained connectivity or when we have an ip-down on internet wan
blink_ipconf()
{
local wanid=${WANID:-0}
local internet; eval internet=`cat $WAND/internet 2>/dev/null`
# If we are called from waneth-up or adsl-up, WANID == 0
# If we are called from ip-down, we only want internet wan
[ "$wanid" != 0 ] && [ "$wanid" != "$internet" ] && return
# We are now trying to get an ip address
# In WAN bridged mode, do not blink internet LED
[ "$wanid" = 0 -a ! -f "$BRIDGED/wan$internet" ] && ledctl bflag_ipconf
[ "$wanid" != 0 -a ! -f "$BRIDGED/wan$wanid" ] && ledctl bflag_ipconf
}
blink_ipconf