slitaz-base-files view rootfs/usr/bin/ipinfo @ rev 343

fix ipinfo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 04 14:28:55 2020 +0000 (2020-10-04)
parents dc2507062df3
children
line source
1 #!/bin/sh
2 #
3 # ipinfo: Show SliTaz local IP address
4 #
5 . /etc/network.conf
7 if [ "$WIFI" = "yes" ]; then
8 iface="$WIFI_INTERFACE"
9 else
10 iface="$INTERFACE"
11 fi
13 ifconfig ${iface} | awk '/inet addr/{print substr($2,6)}'
15 exit 0