summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2021-01-17 13:31:09 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2021-01-17 13:53:52 +0000
commit111351ee1d42eaf8812fc8ebbbe232d216462422 (patch)
tree8280911a865f4e624acd5566933a7388c1c9e9f9 /perl-install/standalone
parent316115651b10a3ec587d633a3d94c98dcb587008 (diff)
downloaddrakx-111351ee1d42eaf8812fc8ebbbe232d216462422.tar
drakx-111351ee1d42eaf8812fc8ebbbe232d216462422.tar.gz
drakx-111351ee1d42eaf8812fc8ebbbe232d216462422.tar.bz2
drakx-111351ee1d42eaf8812fc8ebbbe232d216462422.tar.xz
drakx-111351ee1d42eaf8812fc8ebbbe232d216462422.zip
Factor out detection of kernel boot options (to simplify next commit).
Diffstat (limited to 'perl-install/standalone')
-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.