From f4b54f13eed35c54bedddba954c58c5f6695fe1b Mon Sep 17 00:00:00 2001 From: iliajie Date: Sun, 27 Nov 2022 16:57:52 +0200 Subject: [PATCH] Add text to suggest to install EPEL first for RHEL systems .. or install package manually from `devel:languages:perl` on openSUSE --- xterm/index.cgi | 15 +++++++++++++-- xterm/lang/en | 4 +++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/xterm/index.cgi b/xterm/index.cgi index 4f66581d1..9f5a3ff73 100644 --- a/xterm/index.cgi +++ b/xterm/index.cgi @@ -13,8 +13,19 @@ foreach my $modname (@modnames) { eval "use ${modname};"; if ($@) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0); - print &text('index_cpan', "$modname", - "../cpan/download.cgi?source=3&cpan=$modname&mode=2&return=/$module_name/&returndesc=".&urlize($module_info{'desc'})),"

\n"; + my $missinglink = &text('index_cpan', "$modname", + "../cpan/download.cgi?source=3&cpan=$modname&mode=2&return=/$module_name/&returndesc=".&urlize($module_info{'desc'})); + if ($gconfig{'os_type'} eq 'redhat-linux') { + $missinglink .= " ". + &text('index_epel', + 'https://docs.fedoraproject.org/en-US/epel'); + } + elsif ($gconfig{'os_type'} eq 'suse-linux') { + $missinglink = + &text('index_suse', "$modname", + 'https://software.opensuse.org/download/package?package=perl-IO-Tty&project=devel%3Alanguages%3Aperl'); + } + print $missinglink ."

\n"; &ui_print_footer("/", $text{'index'}); exit; } diff --git a/xterm/lang/en b/xterm/lang/en index f86d23641..5bca61721 100644 --- a/xterm/lang/en +++ b/xterm/lang/en @@ -1,5 +1,7 @@ index_title=Terminal -index_cpan=The Perl module $1 needed to accept WebSockets connections is not available, but you can install it automatically using Webmin's Perl Modules module. +index_cpan=The Perl module $1 is missing, but can be installed automatically using Webmin's Perl Modules module. +index_epel=It is recommended to have EPEL repository enabled first. +index_suse=The Perl package perl-IO-Tty is missing, and should be manually installed first from devel:languages:perl repository. index_euser=Error : User $1 cannot run the shell as it does not exist! index_connecting=Connecting ..