[PATCH 3/3] tools/hotplug: Extend dhcpd conf, init and arg files search

Diego Sueiro posted 3 patches 5 years, 5 months ago
Maintainers: Wei Liu <wl@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>
[PATCH 3/3] tools/hotplug: Extend dhcpd conf, init and arg files search
Posted by Diego Sueiro 5 years, 5 months ago
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 <diego.sueiro@arm.com>
---
 tools/hotplug/Linux/xen-network-common.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
index 8dd3a62..be632ce 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -64,18 +64,18 @@ first_file()
 
 find_dhcpd_conf_file()
 {
-  first_file -f /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf
+  first_file -f /etc/dhcp/dhcpd.conf /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf
 }
 
 
 find_dhcpd_init_file()
 {
-  first_file -x /etc/init.d/{dhcp3-server,dhcp,dhcpd}
+  first_file -x /etc/init.d/{isc-dhcp-server,dhcp-server,dhcp3-server,dhcp,dhcpd}
 }
 
 find_dhcpd_arg_file()
 {
-  first_file -f /etc/sysconfig/dhcpd /etc/defaults/dhcp /etc/default/dhcp3-server
+  first_file -f /etc/sysconfig/dhcpd /etc/defaults/dhcp /etc/default/dhcp-server /etc/default/dhcp3-server
 }
 
 # configure interfaces which act as pure bridge ports:
-- 
2.7.4


Re: [PATCH 3/3] tools/hotplug: Extend dhcpd conf, init and arg files search
Posted by Bertrand Marquis 5 years, 5 months ago

> On 20 Aug 2020, at 12:01, Diego Sueiro <Diego.Sueiro@arm.com> wrote:
> 
> 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 <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

> ---
> tools/hotplug/Linux/xen-network-common.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh
> index 8dd3a62..be632ce 100644
> --- a/tools/hotplug/Linux/xen-network-common.sh
> +++ b/tools/hotplug/Linux/xen-network-common.sh
> @@ -64,18 +64,18 @@ first_file()
> 
> find_dhcpd_conf_file()
> {
> -  first_file -f /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf
> +  first_file -f /etc/dhcp/dhcpd.conf /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf
> }
> 
> 
> find_dhcpd_init_file()
> {
> -  first_file -x /etc/init.d/{dhcp3-server,dhcp,dhcpd}
> +  first_file -x /etc/init.d/{isc-dhcp-server,dhcp-server,dhcp3-server,dhcp,dhcpd}
> }
> 
> find_dhcpd_arg_file()
> {
> -  first_file -f /etc/sysconfig/dhcpd /etc/defaults/dhcp /etc/default/dhcp3-server
> +  first_file -f /etc/sysconfig/dhcpd /etc/defaults/dhcp /etc/default/dhcp-server /etc/default/dhcp3-server
> }
> 
> # configure interfaces which act as pure bridge ports:
> -- 
> 2.7.4
> 
> 


Re: [PATCH 3/3] tools/hotplug: Extend dhcpd conf, init and arg files search
Posted by Wei Liu 5 years, 5 months ago
On Thu, Aug 20, 2020 at 12:01:11PM +0100, Diego Sueiro wrote:
> 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 <diego.sueiro@arm.com>

Acked-by: Wei Liu <wl@xen.org>