Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | Disable OS version check in status screen |
| 2 | |
| 3 | The code is not able to accurately detect the correct distro/version at |
| 4 | the moment. |
| 5 | |
| 6 | Upstream-status: Inappropriate |
| 7 | |
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
| 9 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | Index: 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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 15 | &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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 23 | - 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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 39 | - } |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 40 | +#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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 45 | +# 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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 61 | +# } |
| 62 | |
| 63 | # Password close to expiry |
| 64 | my $warn_days = $config{'warn_days'}; |