upgpkg: 0.97-18
fix compile issues; handle new kernel naming scheme in install-grub script; make install-grub script slightly smarter (though still not very smart)
This commit is contained in:
12
install-grub
12
install-grub
@ -114,15 +114,15 @@ dogrub() {
|
||||
head -n $(cat /tmp/.menu.lst | grep -n '#-\*' | cut -d: -f 1) /tmp/.menu.lst >/boot/grub/menu.lst
|
||||
rm -f /tmp/.menu.lst
|
||||
|
||||
for kernel in /boot/vmlinuz-linux* /boot/vmlinuz26*; do
|
||||
if [ ${kernel} == "/boot/vmlinuz-linux*" ] || [ ${kernel} == "/boot/vmlinuz26*" ] ; then
|
||||
for kernel in /boot/vmlinuz-linux* /boot/vmlinuz26-*; do
|
||||
if [ ${kernel} == "/boot/vmlinuz-linux*" ] || [ ${kernel} == "/boot/vmlinuz26-*" ] ; then
|
||||
echo > /dev/null
|
||||
else
|
||||
VMLINUZ=$( echo ${kernel} | cut -c 7- )
|
||||
|
||||
if [ "$( echo ${VMLINUZ} | cut -c -13 )" = vmlinuz-linux ]; then # new naming scheme for linux > 3.0
|
||||
if [ "$( echo ${VMLINUZ} | cut -c -13 )" = "vmlinuz-linux" ]; then # new naming scheme for linux > 3.0
|
||||
extension=$( echo ${VMLINUZ} | cut -c 14- )
|
||||
INITRAMFS_BASENAME = initramfs-linux${extension}
|
||||
INITRAMFS_BASENAME=initramfs-linux${extension}
|
||||
else # old naming scheme for lts kernel
|
||||
extension=$( echo ${VMLINUZ} | cut -c 10- )
|
||||
INITRAMFS_BASENAME=kernel26${extension}
|
||||
@ -130,7 +130,7 @@ dogrub() {
|
||||
|
||||
echo "" >>/boot/grub/menu.lst
|
||||
echo "# (0) Arch Linux" >>/boot/grub/menu.lst
|
||||
echo "title Arch Linux" >>/boot/grub/menu.lst
|
||||
echo "title Arch Linux - ${VMLINUZ}" >>/boot/grub/menu.lst
|
||||
subdir=
|
||||
if [ "${bootdev}" != "" ]; then
|
||||
grubdev=$(mapdev ${bootdev})
|
||||
@ -144,7 +144,7 @@ dogrub() {
|
||||
|
||||
# adding fallback/full image
|
||||
echo "# (1) Arch Linux" >>/boot/grub/menu.lst
|
||||
echo "title Arch Linux Fallback" >>/boot/grub/menu.lst
|
||||
echo "title Arch Linux Fallback - ${VMLINUZ}" >>/boot/grub/menu.lst
|
||||
echo "root ${grubdev}" >>/boot/grub/menu.lst
|
||||
echo "kernel ${subdir}/${VMLINUZ} root=${PART_ROOT} ro" >>/boot/grub/menu.lst
|
||||
echo "initrd ${subdir}/${INITRAMFS_BASENAME}-fallback.img" >>/boot/grub/menu.lst
|
||||
|
Reference in New Issue
Block a user