[PATCH] dracut-module-setup: Make kdump shell honour and check for PEERDNS
Vivek Goyal
vgoyal at redhat.com
Thu Sep 11 16:03:00 UTC 2014
On Thu, Sep 11, 2014 at 01:29:47PM +0800, Minfei Huang wrote:
> Resolves: rhbz805307
This is RHEL bug number. Please don't specify it when you are posting
patches for inclusion in fedora.
>
> It is useless to configurate the /etc/dhclient.conf to valid in the
> second kernel, when get network config by dhcp. Using the following
> dhclient configuration, the kernel will not override the
> configuration getting from the dhcp server in the file /etc/resolv.conf.
>
> supersede domain-name "machine.test.group";
> supersede domain-name-servers 10.125.97.171, 10.126.98.43, 10.125.97.176;
>
> According to the condition, we should determine to modify the
> /etc/dhclient.conf or not. If set the PEERDNS="no" in the configuration of
> /etc/sysconfig/network-scripts/ifcfg-$net_dev, the dhclient configuration
> will override the search domain and dns servers received from dhcp server.
I think this changelog description needs to be improved. I can't
understand what's the problem. So changelog should describe few
things very cleary.
- What's the problem.
- Why that problem is happening in current code.
- How your patch fixes that problem.
I think you have focussed a lot on 3 part but first two things are
missing from changelog.
Thanks
Vivek
>
> Signed-off-by: Minfei Huang <mhuang at redhat.com>
> ---
> dracut-module-setup.sh | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
> index 02a0557..008e560 100755
> --- a/dracut-module-setup.sh
> +++ b/dracut-module-setup.sh
> @@ -66,6 +66,16 @@ kdump_setup_dns() {
> [ -n "$DNS2" ] && echo "nameserver=$DNS2" >> "$_dnsfile"
> }
>
> +kdump_setup_dhclient() {
> + _dhclient_file="/etc/dhclient.conf"
> + [ ! -e $_dhclient_file ] && return
> +
> + . /etc/sysconfig/network-scripts/ifcfg-$1
> + if [ "x""$PEERDNS" = "xno" ] || [ "x""$PEERDNS" = "xNO" ]; then
> + cat $_dhclient_file | grep ^supersede >> ${initdir}/$_dhclient_file
> + fi
> +}
> +
> #$1: netdev name
> #$2: srcaddr
> #if it use static ip echo it, or echo null
> @@ -252,6 +262,8 @@ kdump_setup_netdev() {
> fi
>
> kdump_setup_dns "$_netdev"
> +
> + kdump_setup_dhclient "$_netdev"
> }
>
> #Function:kdump_install_net
> --
> 1.8.3.1
>
> _______________________________________________
> kexec mailing list
> kexec at lists.fedoraproject.org
> https://lists.fedoraproject.org/mailman/listinfo/kexec
More information about the kexec
mailing list