mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
do not report errors on first run
This commit is contained in:
parent
c0f4b8205e
commit
cb52d7fcf0
@ -90,8 +90,8 @@ doWriteCFG()
|
|||||||
#reset the last updated IP
|
#reset the last updated IP
|
||||||
echo "0.0.0.0" > $IPFILE
|
echo "0.0.0.0" > $IPFILE
|
||||||
|
|
||||||
#reset last update
|
#reset last update (if there is one)
|
||||||
rm $STATUSFILE
|
rm $STATUSFILE 2> /dev/null
|
||||||
|
|
||||||
#find the interface (always the default gateway interface)
|
#find the interface (always the default gateway interface)
|
||||||
DEFAULT=`ip route |grep default |awk '{print $5}'`
|
DEFAULT=`ip route |grep default |awk '{print $5}'`
|
||||||
@ -128,7 +128,7 @@ doWriteCFG()
|
|||||||
|
|
||||||
doGetWANIP()
|
doGetWANIP()
|
||||||
{
|
{
|
||||||
if [ $IPURL ];then
|
if [ ! -z $IPURL ];then
|
||||||
OUTFILE=`mktemp`
|
OUTFILE=`mktemp`
|
||||||
wget -4 -o /dev/null -O $OUTFILE $IPURL
|
wget -4 -o /dev/null -O $OUTFILE $IPURL
|
||||||
WANIP=`cat $OUTFILE`
|
WANIP=`cat $OUTFILE`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user