3 # Run all the postinstall.pl scripts in module and theme directories
8 &foreign_require("webmin", "webmin-lib.pl");
9 @themes = &webmin::list_themes();
12 # Running for specified modules
14 local %minfo = &get_module_info($a);
17 ($tinfo) = grep { $_->{'dir'} eq $a } @themes;
28 # Running on all modules and themes
29 @mods = ( &get_all_module_infos(), @themes );
33 $mdir = &module_root_directory($m->{'dir'});
34 if (&check_os_support($m) &&
35 -r "$mdir/postinstall.pl") {
36 # Call this module's postinstall function
38 $main::error_must_die = 1;
39 &foreign_require($m->{'dir'}, "postinstall.pl");
40 &foreign_call($m->{'dir'}, "module_install");
43 print STDERR "$m->{'dir'}/postinstall.pl failed : $@\n";