summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/various.pm
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2011-04-17 14:01:57 +0000
committerAnssi Hannula <anssi@mageia.org>2011-04-17 14:01:57 +0000
commit6f7b710c51427d1bbe2031376c65fdab1a2f5551 (patch)
treef6c47470998c3f73ba8df0a9f148e540bdc700a7 /lib/Xconfig/various.pm
parentf2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15 (diff)
downloaddrakx-kbd-mouse-x11-6f7b710c51427d1bbe2031376c65fdab1a2f5551.tar
drakx-kbd-mouse-x11-6f7b710c51427d1bbe2031376c65fdab1a2f5551.tar.gz
drakx-kbd-mouse-x11-6f7b710c51427d1bbe2031376c65fdab1a2f5551.tar.bz2
drakx-kbd-mouse-x11-6f7b710c51427d1bbe2031376c65fdab1a2f5551.tar.xz
drakx-kbd-mouse-x11-6f7b710c51427d1bbe2031376c65fdab1a2f5551.zip
Add display_driver_helper script and add/remove nokmsboot boot option as needed.
Diffstat (limited to 'lib/Xconfig/various.pm')
-rw-r--r--lib/Xconfig/various.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm
index 516bd12..ab077f5 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -393,4 +393,19 @@ sub setupFB {
}, $bios_vga_mode);
}
+sub setup_kms {
+ change_bootloader_config(
+ sub {
+ my ($bootloader) = @_;
+ my $kms_ok = run_program::rooted($::prefix, "/sbin/display_driver_helper", "--is-kms-allowed") || 0;
+ return if $kms_ok != bootloader::get_append_simple($bootloader, "nokmsboot");
+ if ($kms_ok) {
+ bootloader::remove_append_simple($bootloader, "nokmsboot");
+ } else {
+ bootloader::set_append_simple($bootloader, "nokmsboot");
+ }
+ 1;
+ });
+}
+
1;