Fix bug#4551 - [FVT] Command genimage print out information of succeed even if dracut was failed
This commit is contained in:
parent
d381d3e723
commit
c1eeb2f1ed
@ -934,7 +934,8 @@ sub mkinitrd_dracut {
|
||||
if ($dracutver > "033") {
|
||||
$additional_options .= " -N";
|
||||
}
|
||||
system("chroot $rootimg_dir dracut $additional_options -f /tmp/initrd.$$.gz $kernelver");
|
||||
!system("chroot $rootimg_dir dracut $additional_options -f /tmp/initrd.$$.gz $kernelver")
|
||||
or die("Error: failed to generate the initial ramdisk for $mode.\n");
|
||||
print "the initial ramdisk for $mode is generated successfully.\n";
|
||||
move("$rootimg_dir/tmp/initrd.$$.gz", "$destdir/initrd-$mode.gz");
|
||||
}
|
||||
|
@ -1072,7 +1072,8 @@ sub mkinitrd_dracut {
|
||||
$additional_options .= " -N";
|
||||
}
|
||||
|
||||
system("chroot $rootimg_dir dracut $additional_options -f /tmp/initrd.$$.gz $kernelver");
|
||||
!system("chroot $rootimg_dir dracut $additional_options -f /tmp/initrd.$$.gz $kernelver")
|
||||
and die("Error: failed to generate the initial ramdisk for $mode.\n");
|
||||
print "the initial ramdisk for $mode is generated successfully.\n";
|
||||
move("$rootimg_dir/tmp/initrd.$$.gz", "$destdir/initrd-$mode.gz");
|
||||
}
|
||||
|
@ -910,7 +910,8 @@ sub mkinitrd_dracut {
|
||||
xdie "the mode: $mode is not supported by genimage";
|
||||
}
|
||||
|
||||
system("chroot $rootimg_dir dracut -f /tmp/initrd.$$.gz $kernelver");
|
||||
!system("chroot $rootimg_dir dracut -f /tmp/initrd.$$.gz $kernelver")
|
||||
or die("Error: failed to generate the initial ramdisk for $mode.\n");
|
||||
print "the initial ramdisk for $mode is generated successfully.\n";
|
||||
move("$rootimg_dir/tmp/initrd.$$.gz", "$destdir/initrd-$mode.gz");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user