From: Valentin Vidic Date: Fri, 24 Apr 2009 12:34:59 +0000 (+0200) Subject: Fix default kernel detection. X-Git-Tag: debian/5.0.0~35 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=d1430f3f81bb10e715e69ad911989599bd72a66a;p=carnet-upgrade.git Fix default kernel detection. --- 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"