summaryrefslogtreecommitdiff
path: root/update-initramfs
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 /update-initramfs
parentefa60794a8a0290ec3972aca23b3ab5f92c3175a (diff)
downloadinitramfs-tools-3c1412b1312c4b12d953aa8413d928bc8c9ad031.tar.gz
initramfs-tools-3c1412b1312c4b12d953aa8413d928bc8c9ad031.zip
- check that an initrd is around before trying to backup
Diffstat (limited to 'update-initramfs')
-rwxr-xr-xupdate-initramfs5
1 files changed, 4 insertions, 1 deletions
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"