summaryrefslogtreecommitdiff
path: root/update-initramfs
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-03-11 10:25:42 +0100
committermaximilian attems <maks@debian.org>2009-03-19 16:57:33 +0100
commitb61ca06a848dd73b57c837fb27cafde3115c9157 (patch)
tree088dfea77d660b3e1f846a11d99647733452d391 /update-initramfs
parent227d20ec6946cb9aa2f2378bf7bae49575e24167 (diff)
downloadinitramfs-tools-b61ca06a848dd73b57c837fb27cafde3115c9157.tar.gz
initramfs-tools-b61ca06a848dd73b57c837fb27cafde3115c9157.zip
update-initramfs: set_linked_version() check if the links point to an existing initrd.img
[ first test existence before link and don't use bashism -maks ] Ubuntu merge 0.92bubuntu24
Diffstat (limited to 'update-initramfs')
-rwxr-xr-xupdate-initramfs4
1 files changed, 2 insertions, 2 deletions
diff --git a/update-initramfs b/update-initramfs
index b5f6f53..3235437 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -338,11 +338,11 @@ set_current_version()
set_linked_version()
{
- if [ -L /initrd.img ]; then
+ if [ -e /initrd.img ] && [ -L /initrd.img ]; then
linktarget="$(basename "$(readlink /initrd.img)")"
fi
- if [ -L /boot/initrd.img ]; then
+ if [ -e /boot/initrd.img ] && [ -L /boot/initrd.img ]; then
linktarget="$(basename "$(readlink /boot/initrd.img)")"
fi