summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-11-04 12:20:05 +0100
committermaximilian attems <maks@debian.org>2006-11-04 12:20:05 +0100
commit3c1412b1312c4b12d953aa8413d928bc8c9ad031 (patch)
treed235e6711954bae3e037d7f3b2245ed8ad3ae1bc
parentefa60794a8a0290ec3972aca23b3ab5f92c3175a (diff)
downloadinitramfs-tools-3c1412b1312c4b12d953aa8413d928bc8c9ad031.tar.gz
initramfs-tools-3c1412b1312c4b12d953aa8413d928bc8c9ad031.zip
- check that an initrd is around before trying to backup
-rw-r--r--debian/changelog6
-rwxr-xr-xupdate-initramfs5
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 991ff6f..f6ef12c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+initramfs-tools (0.85a) unstable; urgency=high
+
+ * On first time run backup_booted_initramfs() has nothing to back up.
+
+ -- maximilian attems <maks@sternwelten.at> Fri, 3 Nov 2006 09:03:46 +0100
+
initramfs-tools (0.85) unstable; urgency=high
Release "Nichts ist getan, wenn noch etwas zu tun übrig ist."
diff --git a/update-initramfs b/update-initramfs
index 0fea63c..e694093 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -82,8 +82,11 @@ backup_booted_initramfs()
# chroot
[ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0
- # no backup yet
+ # first time run
initramfs_bak="${initramfs}.dpkg-bak"
+ [ ! -r "${initramfs_bak}" ] && return 0
+
+ # no backup yet
if [ ! -r "${initramfs}.bak" ]; then
mv -f ${initramfs_bak} "${initramfs}.bak"
verbose "Backup ${initramfs}.bak"