From: Xunlei Pang <xpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Xunlei Pang <xlpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: hkrzesin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
kexec-kdump-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] network/parse-ip-opts.sh: avoid die with multiple "ip=" dhcp cases
Date: Fri, 5 Feb 2016 10:07:32 +0800 [thread overview]
Message-ID: <56B403E4.3040307@redhat.com> (raw)
In-Reply-To: <1454574901-6290-1-git-send-email-xlpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc more.
https://bugzilla.redhat.com/show_bug.cgi?id=1304069
One worry that I have about the patch is the multiple "ip=???:<interface>:dhcp:???"
with a dhcp device specifed, not too sure about the bootdev in this case.
On 2016/02/04 at 16:35, Xunlei Pang wrote:
> When multiple "ip=" dhcp related commands are specified, dracut
> will die. Two "ip=dhcp" is a simple example.
>
> For kdump cases, when the kernel command line contains "ip=dhcp"
> which is inherited by kdump environment, the network dumping also
> hits this.
>
> To fix it, we can treat multiple dhcp related commands just as one.
>
> Signed-off-by: Xunlei Pang <xlpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/40network/parse-ip-opts.sh | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
> index 5779ef8..521f48b 100755
> --- a/modules.d/40network/parse-ip-opts.sh
> +++ b/modules.d/40network/parse-ip-opts.sh
> @@ -22,16 +22,23 @@ fi
> # Count ip= lines to decide whether we need bootdev= or not
> if [ -z "$NEEDBOOTDEV" ] ; then
> count=0
> + has_dhcp=0
> for p in $(getargs ip=); do
> - case "$p" in
> + ip_to_var $p
> + case "$autoconf" in
> ibft)
> continue;;
> + dhcp|dhcp6|on|any)
> + # Regard multiple dhcp cases as one to avoid die
> + has_dhcp=1
> + continue;;
Should we have an extra judgement using $dev here, if NULL then continue?
Regards,
Xunlei
> esac
> count=$(( $count + 1 ))
> done
> + count=$(( $count + $has_dhcp ))
> [ $count -gt 1 ] && NEEDBOOTDEV=1
> fi
> -unset count
> +unset count has_dhcp
>
> # If needed, check if bootdev= contains anything usable
> BOOTDEV=$(getarg bootdev=)
prev parent reply other threads:[~2016-02-05 2:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 8:35 [PATCH] network/parse-ip-opts.sh: avoid die with multiple "ip=" dhcp cases Xunlei Pang
[not found] ` <1454574901-6290-1-git-send-email-xlpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-02-04 9:04 ` Dracut GitHub Import Bot
2016-02-05 2:07 ` Xunlei Pang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B403E4.3040307@redhat.com \
--to=xpang-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hkrzesin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kexec-kdump-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=xlpang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.