1Disable OS version check in status screen
2
3The code is not able to accurately detect the correct distro/version at
4the moment.
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9
10--- a/webmin/webmin-lib.pl
11+++ b/webmin/webmin-lib.pl
12@@ -1170,38 +1170,6 @@ my %miniserv;
13 &get_miniserv_config(\%miniserv);
14 &load_theme_library();	# So that UI functions work
15
16-# Need OS upgrade, but only once per day or if the system was rebooted
17-my $now = time();
18-my $uptime = &get_system_uptime();
19-if (&foreign_available("webmin")) {
20-	my %realos;
21-	my @st = stat($realos_cache_file);
22-	if (!@st || $now - $st[9] > 24*60*60 ||
23-	    $uptime && $now - $st[9] > $uptime) {
24-		%realos = &detect_operating_system(undef, 1);
25-		&write_file($realos_cache_file, \%realos);
26-		}
27-	else {
28-		&read_file($realos_cache_file, \%realos);
29-		}
30-	if (($realos{'os_version'} ne $gconfig{'os_version'} ||
31-	     $realos{'real_os_version'} ne $gconfig{'real_os_version'} ||
32-	     $realos{'os_type'} ne $gconfig{'os_type'}) &&
33-	    $realos{'os_version'} && $realos{'os_type'} &&
34-	    &foreign_available("webmin")) {
35-		# Tell the user that OS version was updated
36-		push(@notifs,
37-		    &ui_form_start("@{[&get_webprefix()]}/webmin/fix_os.cgi").
38-		    &text('os_incorrect',
39-			  $realos{'real_os_type'},
40-			  $realos{'real_os_version'}).
41-		    &show_os_release_notes($realos{'real_os_version'}).
42-		    "<p>\n".
43-		    &ui_form_end([ [ undef, $text{'os_fix'} ] ])
44-		    );
45-		}
46-	}
47-
48 # Password close to expiry
49 my $warn_days = $config{'warn_days'};
50 if (&foreign_check("acl")) {
51