summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperl-install/standalone/service_harddrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index fb813e84f..d69af68bd 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -37,6 +37,10 @@ my $force = member('--force', @ARGV);
my $reboot_needed;
my $do_udev_settle;
+my $cmdline = cat_("/proc/cmdline");
+my $noxconf = $cmdline =~ /\bnoxconf\b/;
+my $nokmsboot = $cmdline =~ /\bnokmsboot\b/;
+
my $invert_do_it = $ARGV[0] eq 'X11' ? 1 : 0;
my ($hw_sysconfdir, $timeout) = ("/etc/sysconfig/harddrake2", $invert_do_it ? 600 : 25);
my $last_boot_config = "$hw_sysconfdir/previous_hw";
@@ -357,7 +361,7 @@ foreach my $hw_class (@harddrake::data::tree) {
modules::load_category($modules_conf, 'bus/usb');
$modules_conf->write;
} elsif ($Ident eq "VIDEO") {
- next if cat_("/proc/cmdline") =~ /noxconf/;
+ next if $noxconf;
# explicitely NOT read the existing config (eg: new profile with globetrotter)
harddrake::autoconf::xconf($modules_conf, {}, member($cfg{SETUP_FB}, qw(NO no)), $cfg{RESOLUTION_WANTED});
$reboot_needed |= after_x_driver_switch();
@@ -425,7 +429,7 @@ if (!$reboot_needed && text2bool($cfg{HANDLE_KMS_BOOT_CONFIG})) {
$reboot_needed |= $kms_changed;
if (!$reboot_needed) {
my $kms_allowed = system("display_driver_helper", "--is-kms-allowed") == 0;
- if (!$kms_allowed && cat_("/proc/cmdline") !~ /\bnokmsboot\b/) {
+ if (!$kms_allowed && !$nokmsboot) {
# Wrong driver loaded and boot parameters incorrect, but fixing the
# bootloader configuration failed.
# Possibly a direct boot from another bootloader.