#!/bin/sh
IP=`ifconfig`; IP=${IP#* inet addr:}; IP1=${IP%% *}; FOUND=false
if [ "$IP1" = "127.0.0.1" ]
then
  IP=${IP#* inet addr:}; IP1=${IP%% *}
  if [ "$IP1" = "127.0.0.1" ]; then
    yaf-splash  -timeout 3 -font "9x15B" -outline 0 -margin 4 -bg orange -placement bottom -text "No IP-address found"
  else
    FOUND=true
  fi
else
  FOUND=true
fi
if $FOUND; then
  yaf-splash  -timeout 3 -font "9x15B" -outline 0 -margin 4 -bg cyan -placement bottom -text "$IP1"
fi
