Re: [PATCH 2/2] let user specify action after systemd start dracut-emergency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/29/2013 02:33 PM, Baoquan He 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@xxxxxxxxxx>
> ---
>  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"


I think 1st line should be changed to 2nd line. I am wondering why
emergency_shell is not used directly here, instead "exec sh -i -l".

Hi Harald,

May I repost the 2/2 by removing "exec sh -i -l"?

Baoquan
Thanks a lot



>  else
>      warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
>      exit 1


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux