When installing a Perl module from CPAN and it already exists in an operating system package (such as from APT or YUM), use that instead.
---- Changes since 1.340 ----
Added Module Config option to not install modules from APT or YUM.
+---- Changes since 1.360 ----
+The module is now available when running Webmin inside a Solaris zone, but only if Perl is not shared with the global zone.
return @rv;
}
+# shared_perl_root()
+# Returns 1 if Perl is shared with the root zone, indicating that Perl modules
+# cannot be installed.
+sub shared_perl_root
+{
+return 0 if (!&running_in_zone());
+local $pp = &get_perl_path();
+if (&foreign_exists("mount")) {
+ &foreign_require("mount", "mount-lib.pl");
+ local @rst = stat($pp);
+ local $m;
+ foreach $m (&mount::list_mounted()) {
+ local @mst = stat($m->[0]);
+ if ($mst[0] == $rst[0] &&
+ &is_under_directory($m->[0], $pp)) {
+ # Found the mount!
+ if ($m->[2] eq "lofs" || $m->[2] eq "nfs") {
+ return 1;
+ }
+ }
+ }
+ }
+return 0;
+}
+
1;
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
undef, undef, undef, &text('index_pversion', $ver));
+# Check if Perl is installed from a global zone
+if (&shared_perl_root()) {
+ print "<b>$text{'index_ezone'}</b><p>\n";
+ &ui_print_footer("/", $text{'index'});
+ exit;
+ }
+
# Display perl modules
@mods = &list_perl_modules();
if (@mods) {
index_recs=The following Perl modules are recommended for installation by Webmin :
index_recsok=Install Selected Modules
index_recsgot=All of the following Perl modules recommended by Webmin are installed : $1
+index_ezone=Perl appears to be shared with the global zone, so modules cannot be installed here. They must be installed in the global zone instead.
download_err=Failed to install module
download_elocal=No local file given
-nozone=1
desc_nl=Perl Modules (CPAN)
desc_ko_KR.euc=Perl ¸ðµâ
desc_ru_SU=íÏÄÕÌÉ Perl