diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | update-initramfs | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 07d28d0..3c7cdb8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,7 +30,11 @@ initramfs-tools (0.86) experimental; urgency=low * init: Mount /sys and /proc nodev, noexec, nosuid - Ubuntu sync. - -- maximilian attems <maks@debian.org> Sat, 17 Mar 2007 21:39:13 +0100 + * update-initramfs: If update-initramfs fails, restore the backup. + Useful if a MINKVER set is not fulfilled. (LP: #101844) + Thanks Soren Hansen <sh@linux2go.dk> for patch. + + -- maximilian attems <maks@debian.org> Mon, 2 Apr 2007 15:01:59 +0200 initramfs-tools (0.85f) unstable; urgency=high diff --git a/update-initramfs b/update-initramfs index a676fe9..9d2b03e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -113,6 +113,15 @@ backup_booted_initramfs() rm -f ${initramfs_bak} } +# restore initramfs backup +restore_initramfs() +{ + [ -z "${initramfs_bak}" ] && return 0 + mv -f "${initramfs_bak}" "${initramfs}" + verbose "Restoring ${initramfs_bak}" +} + + generate_initramfs() { echo "update-initramfs: Generating ${initramfs}" @@ -124,6 +133,7 @@ generate_initramfs() set_sha1 else mkinitramfs_return="$?" + restore_initramfs if [ "$mkinitramfs_return" = "2" ]; then # minversion wasn't met, exit 0 exit 0 |