Remove initramfs/fakelog.root if make-initramfs fails.
authorRichard Jones <rjones@redhat.com>
Fri, 3 Apr 2009 16:23:33 +0000 (17:23 +0100)
committerRichard Jones <rjones@redhat.com>
Fri, 3 Apr 2009 16:23:33 +0000 (17:23 +0100)
Makefile.am

index 05613bb..621df7b 100644 (file)
@@ -38,7 +38,7 @@ $(INITRAMFSIMG) $(VMLINUZ): initramfs/fakeroot.log
 initramfs/fakeroot.log: make-initramfs.sh.in
        -mv $(INITRAMFSIMG) $(INITRAMFSIMG).bak
        -mv $(VMLINUZ) $(VMLINUZ).bak
-       bash $(builddir)/make-initramfs.sh || rm -f $@
+       if ! bash $(builddir)/make-initramfs.sh; then rm -f $@; exit 1; fi
 
 $(INITRAMFSIMG): initramfs/fakeroot.log daemon/guestfsd
        rm -f $@