updated to clean up compiler issues with how functions were used from basis namespace;
[feisty_meow.git] / scripts / system / find_dhcp_unassigned.sh
1 #!/bin/bash
2
3 # note that this will only work on the machine with the dhcp server, and
4 # it only works with our range for unassigned, unknown machines, which is
5 # from 240 through 249.
6 logfile="/var/log/messages"
7 if [ ! -s "$logfile" ]; then
8   # a simple fail over that's not guaranteed to work.
9   logfile="/var/log/syslog"
10 fi
11 grep -i "dhcp.*2[4-5][0-9]" "$logfile" | less
12