blob: 1ca26ca0dd7ad2b00aacd10e3cd41bdf5fba4915 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Disable OS version check in status screen
2
3The code is not able to accurately detect the correct distro/version at
4the moment.
5
Patrick Williamsb9af8752023-01-30 13:28:01 -06006Upstream-Status: Inappropriate
Patrick Williamsb48b7b42016-08-17 15:04:38 -05007
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9
Brad Bishop316dfdd2018-06-25 12:45:53 -040010Index: webmin-1.850/webmin/webmin-lib.pl
11===================================================================
12--- webmin-1.850.orig/webmin/webmin-lib.pl
13+++ webmin-1.850/webmin/webmin-lib.pl
14@@ -1112,28 +1112,28 @@ my %miniserv;
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015 &load_theme_library(); # So that UI functions work
16
17 # Need OS upgrade
18-my %realos = &detect_operating_system(undef, 1);
19-if (($realos{'os_version'} ne $gconfig{'os_version'} ||
20- $realos{'os_type'} ne $gconfig{'os_type'}) &&
21- $realos{'os_version'} && $realos{'os_type'} &&
22- &foreign_available("webmin")) {
Patrick Williamsddad1a12017-02-23 20:36:32 -060023- my ($realminor) = split(/\./, $realos{'os_version'});
24- my ($minor) = split(/\./, $gconfig{'os_version'});
25- if ($realos{'os_type'} eq $gconfig{'os_type'} &&
26- $realminor == $minor) {
27- # Only the minor version number changed - no need to apply
28- &apply_new_os_version(\%realos);
29- }
30- else {
31- # Large enough change to tell the user
32- push(@notifs,
33- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
34- &text('os_incorrect', $realos{'real_os_type'},
35- $realos{'real_os_version'})."<p>\n".
36- &ui_form_end([ [ undef, $text{'os_fix'} ] ])
37- );
38- }
Patrick Williamsb48b7b42016-08-17 15:04:38 -050039- }
Patrick Williamsb48b7b42016-08-17 15:04:38 -050040+#my %realos = &detect_operating_system(undef, 1);
41+#if (($realos{'os_version'} ne $gconfig{'os_version'} ||
42+# $realos{'os_type'} ne $gconfig{'os_type'}) &&
43+# $realos{'os_version'} && $realos{'os_type'} &&
44+# &foreign_available("webmin")) {
Patrick Williamsddad1a12017-02-23 20:36:32 -060045+# my ($realminor) = split(/\./, $realos{'os_version'});
46+# my ($minor) = split(/\./, $gconfig{'os_version'});
47+# if ($realos{'os_type'} eq $gconfig{'os_type'} &&
48+# $realminor == $minor) {
49+# # Only the minor version number changed - no need to apply
50+# &apply_new_os_version(\%realos);
51+# }
52+# else {
53+# # Large enough change to tell the user
54+# push(@notifs,
55+# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
56+# &text('os_incorrect', $realos{'real_os_type'},
57+# $realos{'real_os_version'})."<p>\n".
58+# &ui_form_end([ [ undef, $text{'os_fix'} ] ])
59+# );
60+# }
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061+# }
62
63 # Password close to expiry
64 my $warn_days = $config{'warn_days'};