Fix default kernel detection.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Fri, 24 Apr 2009 12:34:59 +0000 (14:34 +0200)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Fri, 24 Apr 2009 12:34:59 +0000 (14:34 +0200)
src/functions.sh

index 527742a..a8c9b4e 100644 (file)
@@ -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"