20 lines
518 B
Plaintext
20 lines
518 B
Plaintext
{
|
|
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;
|
|
|
|
open (KERNEL, "rpm -qf --qf '%{NAME}' /boot/vmlinuz-$version|");
|
|
my $default = <KERNEL>;
|
|
chomp $default;
|
|
close KERNEL;
|
|
|
|
return "" unless $default;
|
|
|
|
@lines = map { s/DEFAULTKERNEL=.*/DEFAULTKERNEL=$default/; $_ } @lines;
|
|
$OUT = "";
|
|
}
|