Add text to suggest to install EPEL first for RHEL systems

.. or install package manually from `devel:languages:perl` on openSUSE
This commit is contained in:
iliajie
2022-11-27 16:57:52 +02:00
parent 276c599e55
commit f4b54f13ee
2 changed files with 16 additions and 3 deletions

View File

@@ -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', "<tt>$modname</tt>",
"../cpan/download.cgi?source=3&cpan=$modname&mode=2&return=/$module_name/&returndesc=".&urlize($module_info{'desc'})),"<p>\n";
my $missinglink = &text('index_cpan', "<tt>$modname</tt>",
"../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', "<tt>$modname</tt>",
'https://software.opensuse.org/download/package?package=perl-IO-Tty&project=devel%3Alanguages%3Aperl');
}
print $missinglink ."<p>\n";
&ui_print_footer("/", $text{'index'});
exit;
}

View File

@@ -1,5 +1,7 @@
index_title=Terminal
index_cpan=The Perl module <tt>$1</tt> needed to accept WebSockets connections is not available, but you can install it automatically using Webmin's <a href='$2'>Perl Modules</a> module.
index_cpan=The Perl module <tt>$1</tt> is missing, but can be <a href='$2'>installed automatically</a> using Webmin's Perl Modules module.
index_epel=It is recommended to have <a href='$1' target='_blank'>EPEL</a> repository enabled first.
index_suse=The Perl package <tt>perl-IO-Tty</tt> is missing, and should be manually installed first from <a href='$2' target='_blank'>devel:languages:perl</a> repository.
index_euser=Error : User $1 cannot run the shell as it does not exist!
index_connecting=Connecting ..