{
    return "" unless (defined $EVENT and $EVENT eq "local");

    open (VERSION, "/proc/version") or die "Couldn't read /proc/version";
    my $version = <VERSION>;
    chomp $version;
    $version =~ s/^Linux version ([^\s]+) .*/$1/;
    close VERSION;

    $default_index = 0;
    foreach (@lines)
    {
	$default_index=$1 if /^default=(\d+)/;
    }

    my $i = 0;
    foreach $kernel (grep { /^[^#]*kernel\s+.*vmlinuz/ } @lines)
    {
        if ($kernel =~ /vmlinuz-$version\s/)
        {
	    $default_index=$i;
            last;
        }
        $i++;
    }
    @lines = map { s/default=\d+/default=$default_index/; $_ } @lines;
    $OUT = "";
}
