summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-07-08 12:28:32 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-07-22 16:43:12 +0200
commit1369ba01fbe8b83d98381a014290c7baeb6f659f (patch)
treec04e2ec2c7bfd5b5b1bad419d80b7a224768ab98 /package/base-files
parent16b6da640080a8bc3edd6ce0407aa892c5c85288 (diff)
show only one ip, when default route is missing
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcS2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS
index cddbe71e4..d2270318c 100755
--- a/package/base-files/src/etc/init.d/rcS
+++ b/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