Ask for reboot unless new kernel is already installed.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 15 Oct 2013 08:56:37 +0000 (10:56 +0200)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 15 Oct 2013 08:56:37 +0000 (10:56 +0200)
src/functions.sh

index 8df87cc..7037e0d 100644 (file)
@@ -480,7 +480,9 @@ reboot_required () {
   running_version=$( uname -v )
   log "Running kernel: $running_release $running_version"
 
-  if grep -q "$running_release .* $running_version" $default_kernel; then
+  if [ "$kernel_package" != "${kernel_package#linux-image-3.2.0-}" ] ||
+     grep -q "$running_release .* $running_version" $default_kernel
+  then
       log "Latest kernel version is running." 
       return 1
   else