diff options
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/OpenSLX/OSPlugin/Base.pm | 10 | ||||
-rw-r--r-- | os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm | 22 |
2 files changed, 32 insertions, 0 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm index 4b370375..0f601704 100644 --- a/os-plugins/OpenSLX/OSPlugin/Base.pm +++ b/os-plugins/OpenSLX/OSPlugin/Base.pm @@ -129,6 +129,16 @@ sub postRemovalPhase my $pluginTempPath = shift; } +sub suggestAdditionalKernelParams +{ # called by config-demuxer in order to give the plugin a chance to add + # any kernel params it requires. + # In order to do so, the plugin should analyse the contents of the + # given string ('kernel-params') and return a list of additional params + # that it would like to see added. + my $self = shift; + my $kernelParams = shift; +} + sub copyRequiredFilesIntoInitramfs { # called by config-demuxer in order to give the plugin a chance to copy # all required files from the vendor-OS into the initramfs. diff --git a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm index 7de608af..a00cd8a2 100644 --- a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm +++ b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm @@ -111,6 +111,28 @@ sub getAttrInfo }; } +sub suggestAdditionalKernelParams +{ + my $self = shift; + my $kernelParams = shift; + + my @suggestedParams; + + # add vga=0x317 unless explicit vga-mode is already set + if ($kernelParams !~ m{\bvga=}) { + vlog(1, "theme-plugin: adding kernel-param vga=0x317"); + push @suggestedParams, 'vga=0x317'; + } + + # add quiet, if not already set + if ($kernelParams !~ m{\bquiet\b}) { + vlog(1, "theme-plugin: adding kernel-param quiet"); + push @suggestedParams, 'quiet'; + } + + return @suggestedParams; +} + sub copyRequiredFilesIntoInitramfs { my $self = shift; |