Squash bugies

This commit is contained in:
Donald Burr 2015-02-19 00:39:20 -08:00
parent a96d932c14
commit 69f79d25d0
2 changed files with 6 additions and 8 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
MAC=`ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tr '[A-Z]' '[a-z]'`
MAC=`/sbin/ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tr '[A-Z]' '[a-z]'`
if grep -q $MAC HOSTS; then
HOSTNAME=`grep $MAC HOSTS | cut -d\| -f1`
echo "setting hostname to $HOSTNAME"