From: Andrew Gaffney Date: Fri, 26 Dec 2008 21:26:58 +0000 (-0600) Subject: Modify grep regex to account for additional suffixes on old kernel names X-Git-Tag: v3.4.10.903~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b61ee1c07ffa7e4a45ea957640f4313e3038ab28;p=genkernel.git Modify grep regex to account for additional suffixes on old kernel names --- diff --git a/ChangeLog b/ChangeLog index 0657c4d..695ca51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 26 Dec 2008; Andrew Gaffney gen_bootloader.sh: + Modify grep regex to account for additional suffixes on old kernel names + 24 Dec 2008; Andrew Gaffney gen_cmdline.sh, gen_determineargs.sh: Add --busybox-config= commandline option diff --git a/gen_bootloader.sh b/gen_bootloader.sh index ee13ae6..2eb628b 100755 --- a/gen_bootloader.sh +++ b/gen_bootloader.sh @@ -96,8 +96,8 @@ set_bootloader_grub_duplicate_default_replace_kernel_initrd() { set_bootloader_grub_check_for_existing_entry() { local GRUB_CONF=$1 - if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}\>" "${GRUB_CONF}" && - grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}\>" "${GRUB_CONF}" + if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}" && + grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}" then return 0 fi