aboutsummaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch48
1 files changed, 34 insertions, 14 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
index a9ee405075..1ca1480c31 100644
--- a/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
+++ b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
@@ -11,7 +11,7 @@ diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl
index 57a37f7..838b944 100755
--- a/webmin/webmin-lib.pl
+++ b/webmin/webmin-lib.pl
-@@ -1059,18 +1059,19 @@ my %miniserv;
+@@ -1086,28 +1086,28 @@
&load_theme_library(); # So that UI functions work
# Need OS upgrade
@@ -20,26 +20,46 @@ index 57a37f7..838b944 100755
- $realos{'os_type'} ne $gconfig{'os_type'}) &&
- $realos{'os_version'} && $realos{'os_type'} &&
- &foreign_available("webmin")) {
-- push(@notifs,
-- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
-- &text('os_incorrect', $realos{'real_os_type'},
-- $realos{'real_os_version'})."<p>\n".
-- &ui_form_end([ [ undef, $text{'os_fix'} ] ])
-- );
+- my ($realminor) = split(/\./, $realos{'os_version'});
+- my ($minor) = split(/\./, $gconfig{'os_version'});
+- if ($realos{'os_type'} eq $gconfig{'os_type'} &&
+- $realminor == $minor) {
+- # Only the minor version number changed - no need to apply
+- &apply_new_os_version(\%realos);
+- }
+- else {
+- # Large enough change to tell the user
+- push(@notifs,
+- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
+- &text('os_incorrect', $realos{'real_os_type'},
+- $realos{'real_os_version'})."<p>\n".
+- &ui_form_end([ [ undef, $text{'os_fix'} ] ])
+- );
+- }
- }
-+# Disabled for now as os-chooser.pl does not work on our system
+#my %realos = &detect_operating_system(undef, 1);
+#if (($realos{'os_version'} ne $gconfig{'os_version'} ||
+# $realos{'os_type'} ne $gconfig{'os_type'}) &&
+# $realos{'os_version'} && $realos{'os_type'} &&
+# &foreign_available("webmin")) {
-+# push(@notifs,
-+# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
-+# &text('os_incorrect', $realos{'real_os_type'},
-+# $realos{'real_os_version'})."<p>\n".
-+# &ui_form_end([ [ undef, $text{'os_fix'} ] ])
-+# );
++# my ($realminor) = split(/\./, $realos{'os_version'});
++# my ($minor) = split(/\./, $gconfig{'os_version'});
++# if ($realos{'os_type'} eq $gconfig{'os_type'} &&
++# $realminor == $minor) {
++# # Only the minor version number changed - no need to apply
++# &apply_new_os_version(\%realos);
++# }
++# else {
++# # Large enough change to tell the user
++# push(@notifs,
++# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
++# &text('os_incorrect', $realos{'real_os_type'},
++# $realos{'real_os_version'})."<p>\n".
++# &ui_form_end([ [ undef, $text{'os_fix'} ] ])
++# );
++# }
+# }
# Password close to expiry
my $warn_days = $config{'warn_days'};
+