diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-15 12:32:07 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-28 09:09:06 +0000 |
commit | 7ed0fa3092744a8fe9d0b9ebd2d126e5e07b6285 (patch) | |
tree | 9287487de0eb6986ef3bbd841d78acb828128517 /op-mode-definitions | |
parent | a3559f7e429c86ccdfeeac0aaddfc054be403368 (diff) | |
download | vyos-1x-7ed0fa3092744a8fe9d0b9ebd2d126e5e07b6285.tar.gz vyos-1x-7ed0fa3092744a8fe9d0b9ebd2d126e5e07b6285.zip |
op-mode: T1375: Allow to clear dhcp-server lease
Allow to reset dhcp-leases per ip
Parse file '/config/dhcpd.leases' find match section 'lease x.x.x.x {}'
And remove this section
clear dhcp-server lease 192.0.2.21
(cherry picked from commit a83eecfeee1f925c914a46623dd35f96b48389f8)
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/clear-dhcp-server-lease.xml.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/op-mode-definitions/clear-dhcp-server-lease.xml.in b/op-mode-definitions/clear-dhcp-server-lease.xml.in new file mode 100644 index 000000000..b1241588c --- /dev/null +++ b/op-mode-definitions/clear-dhcp-server-lease.xml.in @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="clear"> + <children> + <node name="dhcp-server"> + <properties> + <help>clear DHCP server lease</help> + </properties> + <children> + <tagNode name="lease"> + <properties> + <help>DHCP server lease</help> + </properties> + <command>sudo ${vyos_op_scripts_dir}/clear_dhcp_lease.py --ip $4</command> + </tagNode> + </children> + </node> + </children> + </node> +</interfaceDefinition> |