All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Alexander Tsoy <alexander-EP/B3+myoZc@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dracut-initramfs-restore: make mount error nonfatal
Date: Wed, 2 Sep 2015 12:55:21 +0200	[thread overview]
Message-ID: <55E6D599.9000901@redhat.com> (raw)
In-Reply-To: <E1ZK3hi-0000SN-Lt-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>

On 28.07.2015 13:55, Alexander Tsoy wrote:
> Script enables errexit option (set -e). So if /boot is not a mount point
> or is already mounted, then script dies after unsuccessful mount
> command. Fix this by always returning successful result.
> ---
>  dracut-initramfs-restore.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh
> index 0e6a1a8..0c41a59 100644
> --- a/dracut-initramfs-restore.sh
> +++ b/dracut-initramfs-restore.sh
> @@ -14,7 +14,7 @@ SKIP="$dracutbasedir/skipcpio"
>  
>  [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
>  
> -mount -o ro /boot &>/dev/null
> +mount -o ro /boot &>/dev/null || true
>  
>  if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
>      IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
> 

Thanks! Merged

      parent reply	other threads:[~2015-09-02 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 11:55 [PATCH] dracut-initramfs-restore: make mount error nonfatal Alexander Tsoy
     [not found] ` <E1ZK3hi-0000SN-Lt-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
2015-07-28 13:04   ` Dracut GitHub Import Bot
2015-09-02 10:55   ` Harald Hoyer [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=55E6D599.9000901@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=alexander-EP/B3+myoZc@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 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.