From ff782d5685b2937578075b1d78a1932755a85493 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 6 Oct 2009 02:13:08 +0200 Subject: [PATCH] kernel: update to 2.6.31.2. Run grub-mkconfig at post-install time. --HG-- extra : convert_revision : f9530cb7462f178464c4fd88e11a7eb78c370ba5 --- templates/kernel/INSTALL | 24 +++++------------------- templates/kernel/template | 4 ++-- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/templates/kernel/INSTALL b/templates/kernel/INSTALL index ca528ef758b..a062143a426 100644 --- a/templates/kernel/INSTALL +++ b/templates/kernel/INSTALL @@ -1,28 +1,14 @@ # -# This script adds an entry to grub's menu.lst file. +# This script updates the grub.cfg file for GRUB2. # -menulst=boot/grub/menu.lst - case "${ACTION}" in pre) ;; post) - if [ ! -f $menulst ]; then - [ ! -d boot/grub ] && mkdir -p boot/grub - echo "default 0" >> $menulst - echo "timeout 5" >> $menulst + if [ -x usr/sbin/grub-mkconfig ]; then + echo "Updating grub2 configuration file..." + usr/sbin/grub-mkconfig -o boot/grub/grub.cfg + [ $? -ne 0 ] && exit $? fi - - if grep -q "^title XBPS ${PKGNAME}-${VERSION}$" $menulst; then - exit 0 - fi - - echo "Updating GRUB's menu.lst for kernel-${VERSION}..." - ( \ - echo; \ - echo "title XBPS ${PKGNAME}-${VERSION}"; \ - echo "kernel /boot/vmlinuz-${VERSION} ro quiet root=LABEL=root"; \ - echo "initrd /boot/initrd.img-${VERSION}"; \ - ) >> $menulst ;; esac diff --git a/templates/kernel/template b/templates/kernel/template index ca6b656c5c4..7baf575d699 100644 --- a/templates/kernel/template +++ b/templates/kernel/template @@ -1,7 +1,7 @@ # Template file for 'kernel' pkgname=kernel _kernel_ver=2.6.31 -_kernel_patch_ver=1 +_kernel_patch_ver=2 #revision=1 version=${_kernel_ver}.${_kernel_patch_ver} patch_files="unionfs-2.5.3_for_2.6.31.diff.gz" @@ -14,7 +14,7 @@ make_install_target="modules_install INSTALL_MOD_PATH=${XBPS_DESTDIR}/${pkgname}-${version}" short_desc="The Linux kernel and associated stuff (2.6 branch)" maintainer="Juan RP " -checksum=090af01804323c29e07f0a550f192468eb96cdba9a13d643b03e648a04af6872 +checksum=b23aae233afd8b104d45935f293451683f6ce88f258970536898b9ca0bf9bedb long_desc=" This package provides the linux kernel image and the kernel modules."