slitaz-base-files annotate rootfs/usr/bin/ipinfo @ rev 291

ldd: use $PATH
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 24 10:30:54 2015 +0100 (2015-12-24)
parents 8a1ed3d7ebc2
children dc2507062df3
rev   line source
pankso@244 1 #!/bin/sh
pankso@244 2 #
pankso@244 3 # ipinfo: Show SliTaz local IP address
pankso@244 4 #
pankso@244 5 . /etc/network.conf
pankso@244 6
pankso@244 7 if [ "$WIFI" == "yes" ]; then
pankso@244 8 iface="$WIFI_INTERFACE"
pankso@244 9 else
pankso@244 10 iface="$INTERFACE"
pankso@244 11 fi
pankso@244 12
pascal@291 13 ifconfig ${iface} | awk '/inet addr/{print substr($1,6)}'
pankso@244 14
pankso@244 15 exit 0