mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Baoquan <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] let user specify action after systemd start dracut-emergency
Date: Wed, 29 May 2013 15:03:04 +0800	[thread overview]
Message-ID: <51A5A828.5040700@redhat.com> (raw)
In-Reply-To: <51A5A3A2.8070403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On 05/29/2013 02:43 PM, Baoquan wrote:

>> If failed to mount /sysroot, triggering OnFailure= dependencies
>> > of initrd-xxx.service, then dracut-emergency will be started by
>> > systemd and enter into emergency shell.
>> > 
>> > Here use action_on_fail to replace "exec sh -i -l" in
>> > dracut-emergency.sh so that it may continue if user specify
>> > "action_on_fail=continue" though mount root failed.
>> > 
>> > Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> > ---
>> >  modules.d/98systemd/dracut-emergency.sh |    2 +-
>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>> > 
>> > diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh
>> > index 8ab045e..a4a10e6 100755
>> > --- a/modules.d/98systemd/dracut-emergency.sh
>> > +++ b/modules.d/98systemd/dracut-emergency.sh
>> > @@ -30,7 +30,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
>> >      echo
>> >      [ -f /etc/profile ] && . /etc/profile
>> >      [ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
>> > -    exec sh -i -l
>> > +    ! action_on_fail "Systemd is starting emergency shell" && exec sh -i -l
> 
> 
> ! action_on_fail "Systemd is starting emergency shell" && exec sh -i -l
> ------->
> action_on_fail "Systemd is starting emergency shell"
> 

Well, I was wrong. Looks like the dracut-emergency will hang there, not
interactive.

will post again.

Baoquan
Thanks a lot

  parent reply	other threads:[~2013-05-29  7:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29  6:33 [PATCH 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck Baoquan He
     [not found] ` <078c160e62c2c750efe71fc8a05dd7c5de71bde3.1369809156.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  6:33   ` [PATCH 2/2] let user specify action after systemd start dracut-emergency Baoquan He
     [not found]     ` <d493350a355dc81998fd9a0b2d543ca79c2eb0c7.1369809156.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  6:43       ` Baoquan
     [not found]         ` <51A5A3A2.8070403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  7:03           ` Baoquan [this message]
     [not found]             ` <51A5A828.5040700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  8:54               ` Harald Hoyer
     [not found]                 ` <51A5C256.6070107-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  9:15                   ` Baoquan
2013-05-30  6:28   ` [PATCH 1/2] 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck Harald Hoyer

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=51A5A828.5040700@redhat.com \
    --to=bhe-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=harald-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