summaryrefslogtreecommitdiff
path: root/src/system/on-dhcp-event.sh
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-02-28 11:31:30 +0100
committerDaniil Baturin <daniil@baturin.org>2019-02-28 11:31:30 +0100
commitb8f9ecfafd36c22e80a6d47e24c4b21ac5ed63f9 (patch)
tree207d2f2f2968e9df543a8dda81a2c3a855c0b43a /src/system/on-dhcp-event.sh
parentc8dad2dff35879ec78f3ade11e959ae392819e05 (diff)
parent80f378c62b46b6405047c658d96e98542b21f773 (diff)
downloadvyos-1x-b8f9ecfafd36c22e80a6d47e24c4b21ac5ed63f9.tar.gz
vyos-1x-b8f9ecfafd36c22e80a6d47e24c4b21ac5ed63f9.zip
Merge branch 'crux' of https://github.com/vyos/vyos-1x into crux
Diffstat (limited to 'src/system/on-dhcp-event.sh')
-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