From d1430f3f81bb10e715e69ad911989599bd72a66a Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Fri, 24 Apr 2009 14:34:59 +0200 Subject: [PATCH] Fix default kernel detection. --- src/functions.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/functions.sh b/src/functions.sh index 527742a..a8c9b4e 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -510,7 +510,7 @@ reboot_required () { if [ -z "$default_kernel" -a -r "/boot/grub/menu.lst" ]; then default_kernel=$( awk ' $1 == "default" { default = $2; - if (default != /^[[:digit:]]+$/) { exit } } + if (default !~ /^[0-9]+$/) { exit } } $1 == "title" { title+=1 } $1 == "kernel" && title==default+1 { print $2; exit }' \ /boot/grub/menu.lst 2>/dev/null ) @@ -537,11 +537,6 @@ reboot_required () { log "Default kernel package: $kernel_package" - if [ "$kernel_package" != "kernel-2.6-cn" ]; then - log "Default kernel package is not kernel-2.6-cn" - return 1 - fi - running_release=$( uname -r ) running_version=$( uname -v ) log "Running kernel: $running_release $running_version" -- 1.7.10.4