summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/system/on-dhcp-event.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/system/on-dhcp-event.sh b/src/system/on-dhcp-event.sh
index d671bffd6..02bbd4c3c 100755
--- a/src/system/on-dhcp-event.sh
+++ b/src/system/on-dhcp-event.sh
@@ -22,6 +22,11 @@ domain=$5
file=/etc/hosts
changes=0
+if [ -z "$client_name" ]; then
+ logger -s -t on-dhcp-event "Client name was empty, using MAC \"$client_mac\" instead"
+ client_name=$(echo "client-"$client_mac | tr : -)
+fi
+
if [ "$domain" == "..YYZ!" ]; then
client_fqdn_name=$client_name
client_search_expr=$client_name