summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
blob: 46b1f7c7b80cc9f1a67793d30fb2d1b6f6ed1ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Disable OS version check in status screen

The code is not able to accurately detect the correct distro/version at
the moment.

Upstream-Status: Inappropriate

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

--- a/webmin/webmin-lib.pl
+++ b/webmin/webmin-lib.pl
@@ -1170,38 +1170,6 @@ my %miniserv;
 &get_miniserv_config(\%miniserv);
 &load_theme_library();	# So that UI functions work
 
-# Need OS upgrade, but only once per day or if the system was rebooted
-my $now = time();
-my $uptime = &get_system_uptime();
-if (&foreign_available("webmin")) {
-	my %realos;
-	my @st = stat($realos_cache_file);
-	if (!@st || $now - $st[9] > 24*60*60 ||
-	    $uptime && $now - $st[9] > $uptime) {
-		%realos = &detect_operating_system(undef, 1);
-		&write_file($realos_cache_file, \%realos);
-		}
-	else {
-		&read_file($realos_cache_file, \%realos);
-		}
-	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'} ] ])
-		    );
-		}
-	}
-
 # Password close to expiry
 my $warn_days = $config{'warn_days'};
 if (&foreign_check("acl")) {