public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove the incomplete .img file
@ 2015-07-21  9:18 Chao Fan
       [not found] ` <1437470322-992-1-git-send-email-cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Fan @ 2015-07-21  9:18 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Chao Fan

If the directory where the .img file is saved has no enough space, or in
other wrong conditions, dracut will get an incomplete file xxx.img. But
sometimes this .img file will be loaded when rebooting the system. And then
some bugs will happen because this .img file is wrong.

So I think dracut should remove the incomplete file because this .img file
with problems was made by dracut. And then the wrong file will not be loaded
anymore.

Signed-off-by: Chao Fan <cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 dracut.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dracut.sh b/dracut.sh
index ee0a039..122ae0c 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1651,6 +1651,7 @@ if ! (
             | $compress >> "$outfile"
     ); then
     dfatal "dracut: creation of $outfile failed"
+	rm -f $outfile
     exit 1
 fi
 dinfo "*** Creating initrd image file '$outfile' done ***"
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove the incomplete .img file
       [not found] ` <1437470322-992-1-git-send-email-cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-07-21 10:05   ` Dracut GitHub Import Bot
  2015-09-02 11:23   ` Harald Hoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Dracut GitHub Import Bot @ 2015-07-21 10:05 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Patchset imported to github.
Pull request:
<https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1437470322-992-1-git-send-email-cfan%40redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove the incomplete .img file
       [not found] ` <1437470322-992-1-git-send-email-cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2015-07-21 10:05   ` Dracut GitHub Import Bot
@ 2015-09-02 11:23   ` Harald Hoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Harald Hoyer @ 2015-09-02 11:23 UTC (permalink / raw)
  To: Chao Fan, initramfs-u79uwXL29TY76Z2rM5mHXA

On 21.07.2015 11:18, Chao Fan wrote:
> If the directory where the .img file is saved has no enough space, or in
> other wrong conditions, dracut will get an incomplete file xxx.img. But
> sometimes this .img file will be loaded when rebooting the system. And then
> some bugs will happen because this .img file is wrong.
> 
> So I think dracut should remove the incomplete file because this .img file
> with problems was made by dracut. And then the wrong file will not be loaded
> anymore.
> 
> Signed-off-by: Chao Fan <cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  dracut.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/dracut.sh b/dracut.sh
> index ee0a039..122ae0c 100755
> --- a/dracut.sh
> +++ b/dracut.sh
> @@ -1651,6 +1651,7 @@ if ! (
>              | $compress >> "$outfile"
>      ); then
>      dfatal "dracut: creation of $outfile failed"
> +	rm -f $outfile
>      exit 1
>  fi
>  dinfo "*** Creating initrd image file '$outfile' done ***"
> 

Thanks! Merged, despite the <tab>.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-02 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21  9:18 [PATCH] remove the incomplete .img file Chao Fan
     [not found] ` <1437470322-992-1-git-send-email-cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-21 10:05   ` Dracut GitHub Import Bot
2015-09-02 11:23   ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox