diff options
author | kroy-the-rabbit <kroy@kroy.io> | 2020-05-19 13:24:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 13:24:32 -0500 |
commit | 285b2ca75475600756b92d639fc188c291fdddeb (patch) | |
tree | 0ee806d06d61c6343f8602c742b94468fb580289 /src/system | |
parent | 5cbdffd3c1bd3eedc1b17010964dc69be6962349 (diff) | |
download | vyos-1x-285b2ca75475600756b92d639fc188c291fdddeb.tar.gz vyos-1x-285b2ca75475600756b92d639fc188c291fdddeb.zip |
T2465: vyos-hostsd-client needs sudo
There have been a number of complaints about DHCP not getting inserted into the `/etc/hosts` file. This should correct that problem.
Diffstat (limited to 'src/system')
-rwxr-xr-x | src/system/on-dhcp-event.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/system/on-dhcp-event.sh b/src/system/on-dhcp-event.sh index 385ae460f..3e2b6430d 100755 --- a/src/system/on-dhcp-event.sh +++ b/src/system/on-dhcp-event.sh @@ -43,13 +43,13 @@ case "$action" in exit 1 fi # add host - /usr/bin/vyos-hostsd-client --add-hosts --tag "DHCP-$client_ip" --host "$client_fqdn_name,$client_ip" + sudo /usr/bin/vyos-hostsd-client --add-hosts --tag "DHCP-$client_ip" --host "$client_fqdn_name,$client_ip" ((changes++)) ;; release) # delete mapping for released address # delete host - /usr/bin/vyos-hostsd-client --delete-hosts --tag "DHCP-$client_ip" + sudo /usr/bin/vyos-hostsd-client --delete-hosts --tag "DHCP-$client_ip" ((changes++)) ;; |