--- grub-mkconfig_lib 2013-07-03 05:39:21.000000000 +0200 +++ grub-mkconfig_lib 2015-10-14 17:02:53.232135149 +0200 @@ -216,6 +216,12 @@ *.old:*) a="`echo -n "$a" | sed -e 's/\.old$//'`" ; cmp=gt ;; *:*.old) b="`echo -n "$b" | sed -e 's/\.old$//'`" ; cmp=ge ;; esac + + # --PHPNET-- an epoch of "1:" is added in prefix of the kernel version so dpkg will always see these kernel versions as the most recent and put them before the others in grub.cfg + echo "$a" |grep -Eq -- '-openvz-|-pve|-beng' && a="1:$a" + echo "$b" |grep -Eq -- '-openvz-|-pve|-beng' && b="1:$b" + # --PHPNET-- + dpkg --compare-versions "$a" $cmp "$b" return "$?" }