From: Baoquan <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] Add a special handler when mount rootfs failed
Date: Mon, 31 Dec 2012 16:12:41 +0800 [thread overview]
Message-ID: <50E148F9.4050903@redhat.com> (raw)
In-Reply-To: <d98a268350d0f13f6dd4d464a1a21517668eeb57.1356080083.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 12/21/2012 04:55 PM, Baoquan He wrote:
> Dracut will drop into shell in case anything wrong with rootfs mounting,
> but for kdump we does not depends on rootfs for non-rootfs dump and
> kdump will handle the default fail action based on user configuration
> in /etc/kdump.conf.
>
> Here call exception_handle_check and specify a handler continue_on_fail.
> If user add a cmdline like rd.exceptionhandler=continue_on_fail, then
> go on. If no cmdline rd.exceptionhandler=continue_on_fail added, just
> drop into shell as before.
>
> Signed-off-by: Baoquan He<bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/98systemd/dracut-initqueue.sh | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh
> index c10b32f..1d8d5a5 100755
> --- a/modules.d/98systemd/dracut-initqueue.sh
> +++ b/modules.d/98systemd/dracut-initqueue.sh
> @@ -102,9 +102,14 @@ while :; do
> done
>
> i=$(($i+1))
> - [ $i -gt 20 ]&& emergency_shell "Can't mount root filesystem"
In below code "$$" should be "&&". I tested this patchset by changing
mount-loop limitation count to 1.
+ [ $i -gt 20 ] && failure='yes' && break
> + [ $i -gt 20 ]&& failure='yes' $$ break
> done
>
> +if [ "$failure" = "yes" ]; then
> + exception_handle_check -h "continue_on_fail" "Can't mount root filesystem"
> + failure="no"
> +fi
> +
> {
> echo -n "Mounted root filesystem "
> while read dev mp rest; do [ "$mp" = "$NEWROOT" ]&& echo $dev; done< /proc/mounts
next prev parent reply other threads:[~2012-12-31 8:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 8:55 [PATCH 1/3] Add an exception handle check function Baoquan He
[not found] ` <76d7b2f339455dcea6a2827b004bfcd9c6fa2315.1356080083.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-21 8:55 ` [PATCH 2/3] Specify a special handler when initqueue timeout Baoquan He
2012-12-21 8:55 ` [PATCH 3/3] Add a special handler when mount rootfs failed Baoquan He
[not found] ` <d98a268350d0f13f6dd4d464a1a21517668eeb57.1356080083.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-31 8:12 ` Baoquan [this message]
2012-12-21 9:30 ` [PATCH 1/3] Add an exception handle check function Baoquan
2013-01-15 7:22 ` Baoquan
2013-01-17 10:03 ` Dave Young
[not found] ` <50F7CC85.5060303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-18 2:06 ` Dave Young
2013-01-24 3:12 ` Baoquan
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=50E148F9.4050903@redhat.com \
--to=bhe-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox