diff options
| author | Sebastian Schmelzer | 2009-01-27 02:14:34 +0100 |
|---|---|---|
| committer | Sebastian Schmelzer | 2009-01-27 02:14:34 +0100 |
| commit | ba6255dc003bc9d6375202c83d4f375c72863cbc (patch) | |
| tree | de61eef6661e817d7584d523a6a366326dce8972 /packaging/dpkg/default_files/preinst | |
| parent | First design studies on new PreBoot environment: mconf examples and (diff) | |
| download | core-ba6255dc003bc9d6375202c83d4f375c72863cbc.tar.gz core-ba6255dc003bc9d6375202c83d4f375c72863cbc.tar.xz core-ba6255dc003bc9d6375202c83d4f375c72863cbc.zip | |
* fix debian buildpackage stuff .. :)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2528 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'packaging/dpkg/default_files/preinst')
| -rwxr-xr-x | packaging/dpkg/default_files/preinst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/packaging/dpkg/default_files/preinst b/packaging/dpkg/default_files/preinst new file mode 100755 index 00000000..f31c6596 --- /dev/null +++ b/packaging/dpkg/default_files/preinst @@ -0,0 +1,35 @@ +#!/bin/sh + +if [ "$1" = "install" ]; then + MISSING=0 + MISSING_MODULES="" + + echo "" + echo " Preparing installation of OpenSLX! \n" + echo " Checking for required perl Modules:" + for m in Carp Clone Config::General Cwd DBI Digest::MD5 Encode Fcntl \ + File::Basename File::Find File::Glob File::Path FindBin \ + Getopt::Long List::Util Pod::Usage POSIX Socket Storable \ + Sys::Hostname Term::ReadLine ; do + + echo -n " * $m .. " + if ! perl -e "use $m" 2>>/dev/null ; then + echo "not found"; + $MISSING=1; + $MISSING_MODULES="$MISSING_MODULES $m"; + else + echo "found" + fi; + done; + + if [ $MISSING -gt 0 ]; then + echo " Some perl Modules couldn't be found:"; + echo " $MISSING_MODULES"; + echo " Install them with cpan / aptitude and try again .. \n"; + exit 1; + else + echo " All checks successfull. Continue with installation." + exit 0; + fi; +fi; + |
