Update update-initramfs
This commit is contained in:
parent
08b2f977f6
commit
aef7377139
@ -186,7 +186,7 @@ get_sorted_versions()
|
|||||||
version_list="$(
|
version_list="$(
|
||||||
linux-version list |
|
linux-version list |
|
||||||
while read -r version; do
|
while read -r version; do
|
||||||
test -e "${BOOTDIR}/initrd.img-$version" && echo "$version"
|
test -e "${BOOTDIR}/booster.img-$version" && echo "$version"
|
||||||
done |
|
done |
|
||||||
linux-version sort --reverse
|
linux-version sort --reverse
|
||||||
)"
|
)"
|
||||||
@ -195,7 +195,7 @@ get_sorted_versions()
|
|||||||
|
|
||||||
set_current_version()
|
set_current_version()
|
||||||
{
|
{
|
||||||
if [ -f "/boot/initrd.img-$(uname -r)" ]; then
|
if [ -f "/boot/booster.img-$(uname -r)" ]; then
|
||||||
version=$(uname -r)
|
version=$(uname -r)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -203,19 +203,19 @@ set_current_version()
|
|||||||
set_linked_version()
|
set_linked_version()
|
||||||
{
|
{
|
||||||
linktarget=
|
linktarget=
|
||||||
if [ -e /initrd.img ] && [ -L /initrd.img ]; then
|
if [ -e /booster.img ] && [ -L /booster.img ]; then
|
||||||
linktarget="$(basename "$(readlink /initrd.img)")"
|
linktarget="$(basename "$(readlink /booster.img)")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e /boot/initrd.img ] && [ -L /boot/initrd.img ]; then
|
if [ -e /boot/booster.img ] && [ -L /boot/booster.img ]; then
|
||||||
linktarget="$(basename "$(readlink /boot/initrd.img)")"
|
linktarget="$(basename "$(readlink /boot/booster.img)")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${linktarget}" ]; then
|
if [ -z "${linktarget}" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
version="${linktarget##initrd.img-}"
|
version="${linktarget##booster.img-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_highest_version()
|
set_highest_version()
|
||||||
|
Loading…
Reference in New Issue
Block a user