Browse Source

show only one ip, when default route is missing

Waldemar Brodkorb 10 years ago
parent
commit
1369ba01fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/base-files/src/etc/init.d/rcS

+ 1 - 1
package/base-files/src/etc/init.d/rcS

@@ -80,6 +80,6 @@ fi
 } |tee /dev/stderr |logger -p 6 -t ''
 
 if [ $rcquiet -ne 1 ];then
-	ipaddr=$(ip addr show $(ip route show|awk '/default/ { print $5 }')|awk '/inet / { print $2 }')
+	ipaddr=$(ip addr show $(ip route show|awk '/default/ { print $5 }')|awk '/inet / { print $2 }'|tail -1)
 	echo "Your ip adress is $ipaddr"
 fi