mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Don't do OS detection if we can't use it
This commit is contained in:
@@ -1148,22 +1148,25 @@ my %miniserv;
|
||||
&load_theme_library(); # So that UI functions work
|
||||
|
||||
# Need OS upgrade
|
||||
my %realos = &detect_operating_system(undef, 1);
|
||||
if (($realos{'os_version'} ne $gconfig{'os_version'} ||
|
||||
$realos{'real_os_version'} ne $gconfig{'real_os_version'} ||
|
||||
$realos{'os_type'} ne $gconfig{'os_type'}) &&
|
||||
$realos{'os_version'} && $realos{'os_type'} &&
|
||||
&foreign_available("webmin")) {
|
||||
if (&foreign_available("webmin")) {
|
||||
my %realos = &detect_operating_system(undef, 1);
|
||||
if (($realos{'os_version'} ne $gconfig{'os_version'} ||
|
||||
$realos{'real_os_version'} ne $gconfig{'real_os_version'} ||
|
||||
$realos{'os_type'} ne $gconfig{'os_type'}) &&
|
||||
$realos{'os_version'} && $realos{'os_type'} &&
|
||||
&foreign_available("webmin")) {
|
||||
|
||||
# Tell the user that OS version was updated
|
||||
push(@notifs,
|
||||
&ui_form_start("@{[&get_webprefix()]}/webmin/fix_os.cgi").
|
||||
&text('os_incorrect', $realos{'real_os_type'},
|
||||
$realos{'real_os_version'}).
|
||||
&show_os_release_notes($realos{'real_os_version'}).
|
||||
".<p>\n".
|
||||
&ui_form_end([ [ undef, $text{'os_fix'} ] ])
|
||||
);
|
||||
# Tell the user that OS version was updated
|
||||
push(@notifs,
|
||||
&ui_form_start("@{[&get_webprefix()]}/webmin/fix_os.cgi").
|
||||
&text('os_incorrect',
|
||||
$realos{'real_os_type'},
|
||||
$realos{'real_os_version'}).
|
||||
&show_os_release_notes($realos{'real_os_version'}).
|
||||
"<p>\n".
|
||||
&ui_form_end([ [ undef, $text{'os_fix'} ] ])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
# Password close to expiry
|
||||
|
||||
Reference in New Issue
Block a user