Using 'cp' prevents some mistakes where the user will actually
continue to modify dhcp.conf.real where it would not be the one
used anymore.
Signed-off-by: Diego Sueiro
---
Changes in v2:
- Update commit message
- Simplify the code when removing the temp file.
---
tools/hotplu
>-Original Message-
>From: Wei Liu
>Sent: 07 September 2020 16:10
>To: Bertrand Marquis
>Cc: Wei Liu ; Diego Sueiro ; xen-
>de...@lists.xenproject.org; nd ; Ian Jackson
>
>Subject: Re: [PATCH 2/3] tools/hotplug: Fix dhcpd symlink removal in vif-nat
>
>On M
This patch series fixes issues around the vif-nat script when
setting up the vif interface and dhcp server in dom0.
It has been validated and used in Yocto and meta-arm-autonomy
Diego Sueiro (3):
tools/hotplug: Fix hostname setting in vif-nat
tools/hotplug: Fix dhcpd symlink removal in vif
Setting the hostname is failing because the "$XENBUS_PATH/domain"
doesn't exist anymore. To fix this we set it to dom$domid
Signed-off-by: Diego Sueiro
---
tools/hotplug/Linux/vif-nat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hotplug/Linux/vif-nat
Copy temp files used to add/remove dhcpd configurations to avoid
replacing potential symlinks.
Signed-off-by: Diego Sueiro
---
tools/hotplug/Linux/vif-nat | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
Newer versions of the ISC dhcp server expect the dhcpd.conf file
to be located at /etc/dhcp directory.
Also, some distributions and Yocto based ones have these installation
paths by default: /etc/init.d/{isc-dhcp-server,dhcp-server} and
/etc/default/dhcp-server.
Signed-off-by: Diego Sueiro