[FIX] point_of_sale: IoT Box Changing IP

After each reboot, the IP address of the IoT Boxes changed.

The problem was due to the fact that the UID that was sent to the DHCP
server was sometimes different after the box had been rebooted.

The UID was saved to `/var/lib/dhcpcd5/duid`, which was deleted after
every reboot. The UID then had to be recomputed. This UID contains a
timestamp, which was sometimes off by 1-2 seconds from one boot to the
other. The lease was then not found on the DHCP server and a new one
was created, with a new IP address.

We replace the UID by the clientID, which is not dependent on the time
but only on the MAC address of the IoT Box.

closes odoo/odoo#51889

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Antoine Prieels
2020-05-26 11:58:34 +00:00
parent 8deac894f8
commit cba03871a3
@@ -11,7 +11,7 @@ hostname
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
duid
clientid
# Persist interface configuration when dhcpcd exits.
persistent