only print .local name if avahi is installed

This commit is contained in:
j 2013-07-11 17:10:17 +02:00
parent a2a313904e
commit 8349c494d3

View file

@ -84,7 +84,9 @@ cat > /usr/local/bin/genissue <<EOF
HOST=\$(rgrep .local /var/log/syslog | grep "Host name is" | tail -n 1 | awk '{print \$12}' | sed 's/\.$//')
echo Welcome to pan.do/ra. Connect via one of these URLs:
echo
if [ -n "$HOST" ]; then
echo " http://\$HOST/"
fi
for ip in \$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print \$1 }'); do
echo " http://\$ip/"
done