Skip to content
Snippets Groups Projects
Verified Commit 70b61421 authored by David Beniamine's avatar David Beniamine
Browse files

Get ip : keep newest ip not oldest

parent 522c3dfa
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
getip(){
awk '/^lease/{IP=$2} /hardware ethernet/{gsub(";","",$3);if($3 == "'$1'"){print IP}}' \
< /var/lib/dhcp/dhcpd.leases | head -n 1
< /var/lib/dhcp/dhcpd.leases | tail -n 1
}
runcmd(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment