Bessere Fehlermeldung fuer nicht-Techniker
[kivitendo-erp.git] / scripts / installation_check.pl
index def8590..2bec003 100755 (executable)
@@ -13,7 +13,28 @@ BEGIN {
   $master_templates = './templates/print/';
 }
 
+unless (eval { require Config::Std; 1 }){
+  print STDERR <<EOL ;
++------------------------------------------------------------------------------+
+  Perl Modul Config::Std could not be loaded.
+
+  Debian: you may install the needed *.deb package with:
+    apt-get install libconfig-std-perl
+
+  RPM: There is a rpm package "perl-Config-Std"
+
+  Suse: you may install the needed *.rpm package with:
+    zypper install perl-Config-Std
+
++------------------------------------------------------------------------------+
+EOL
+
+  exit 72;
+}
+
 use SL::InstallationCheck;
+use SL::LxOfficeConf;
+
 
 my %check;
 Getopt::Long::Configure ("bundling");
@@ -47,6 +68,12 @@ if ($check{a}) {
 
 $| = 1;
 
+if (!SL::LxOfficeConf->read(undef, 'may fail')) {
+  print_header('Could not load the config file. If you have dependancies from any features enabled in the configuration these will still show up as optional because of this. Please rerun this script after installing the dependancies needed to load the cofiguration.')
+} else {
+  SL::InstallationCheck::check_for_conditional_dependencies();
+}
+
 if ($check{r}) {
   print_header('Checking Required Modules');
   check_module($_, required => 1) for @SL::InstallationCheck::required_modules;