* [PATCH] dracut-initramfs-restore: make mount error nonfatal
@ 2015-07-28 11:55 Alexander Tsoy
[not found] ` <E1ZK3hi-0000SN-Lt-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Tsoy @ 2015-07-28 11:55 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
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"
--
2.3.6
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <E1ZK3hi-0000SN-Lt-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>]
* Re: [PATCH] dracut-initramfs-restore: make mount error nonfatal [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 1 sibling, 0 replies; 3+ messages in thread From: Dracut GitHub Import Bot @ 2015-07-28 13:04 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:E1ZK3hi-0000SN-Lt%40puleglot.ru> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dracut-initramfs-restore: make mount error nonfatal [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 1 sibling, 0 replies; 3+ messages in thread From: Harald Hoyer @ 2015-09-02 10:55 UTC (permalink / raw) To: Alexander Tsoy, initramfs-u79uwXL29TY76Z2rM5mHXA 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-02 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox