UmVirt LFS Assistant command info
check_environment
Info: Check environment variables, kernel & paths, disk space
Commands:
#!/bin/bash
checkpath(){
if [ $CHKPATH ]; then
CHKRES=$CHKPATH
else
CHKRES="Not found!"
fi
}
#======
#SYSTEM
#======
ARCH=`uname -m`
OS=`uname -o`
KERNEL=`uname -r`ARCH=`uname -m`
OS=`uname -o`
KERNEL=`uname -r`
MAKEFLAGS_=`env | grep MAKEFLAGS`
#MODULES
KMODULES="/lib/modules/$KERNEL"
CHKPATH=$KMODULES
checkpath
KMODULES=$CHKRES
#HEADERS
KHEADERS=`readlink -f /lib/modules/$KERNEL/build`
CHKPATH=$KHEADERS
checkpath
KHEADERS=$CHKRES
#HEADERS
KHEADERSDIR=$KHEADERS
if [ ! -f $KHEDERS ]; then
KHEADERSDIR="Not found!"
fi
#================
#ULFS Integration
#=================
UMVIRT_ASSISTANT_URL_=`env | grep UMVIRT_ASSISTANT_URL`
UMVIRT_PACKAGES_URL_=`env | grep UMVIRT_PACKAGES_URL`
UMVIRT_RELEASE_=`env | grep UMVIRT_RELEASE`
SOURCESDIR="/sources"
SOURCESDIRSPACE=` df -P -BM /sources | awk 'NR==2 {print $4}'`
if [ ! -d $SOURCESDIR ]; then
SOURCESDIR="Not found!"
SOURCESDIRSPACE="0M"
fi
CHIMP=`which chimp`
CHKPATH=$CHIMP
checkpath
CHIMP=$CHKRES
#===========
#QT PLATFORM
#===========
#QT
QTDIR_=`env | grep QT5DIR`
QMAKE=`which qmake`
CHKPATH=$QMAKE
checkpath
QMAKE=$CHKRES
#=====================
#JAVA PLATFORM SUPPORT
#=====================
JAVAHOME_=`env | grep JAVA_HOME`
#JAVA
JAVA=`which java`
CHKPATH=$JAVA
checkpath
JAVA=$CHKRES
#JAVA
JAVAC=`which javac`
CHKPATH=$JAVAC
checkpath
JAVAC=$CHKRES
#MAVEN
MAVEN=`which mvn`
CHKPATH=$MAVEN
checkpath
MAVEN=$CHKRES
#ANT
ANT=`which ant`
CHKPATH=$ANT
checkpath
ANT=$CHKRES
echo -e "ULFS Environment Check Tool\n"
echo -e "System check\n"
echo -e "Architecture: $ARCH"
echo -e "OS: $OS"
echo -e "OS Kernel: $KERNEL"
echo -e "OS Kernel modules: $KMODULES"
echo -e "OS Kernel headers link target: $KHEADERS"
echo -e "OS Kernel headers directory: $KHEADERSDIR"
echo -e "MAKEFLAGS environment variable value... \"$MAKEFLAGS_\"";
echo -e "\nULFS inegration check\n"
echo -e "UMVIRT_ASSISTANT_URL environment variable value...
\"$UMVIRT_ASSISTANT_URL_\"";
echo -e "UMVIRT_PACKAGES_URL environment variable value...
\"$UMVIRT_PACKAGES_URL_\"";
echo -e "UMVIRT_RELEASE environment variable value...
\"$UMVIRT_RELEASE_\"";
echo -e "Sources dir check... $SOURCESDIR";
echo -e "Sources dir free space... $SOURCESDIRSPACE";
echo -e "ULFS package manager (chimp)... $CHIMP";
echo -e "\nQT5 platform check\n"
echo -e "QT5DIR environment variable value... \"$QTDIR_\"";
echo -e "QMake binary (qmake)... $QMAKE";
echo -e "\nJava platform check\n"
echo -e "JAVA_HOME environment variable value... \"$JAVAHOME_\"";
echo -e "Java binary (java)... $JAVA";
echo -e "Java compiler binary (javac)... $JAVAC";
echo -e "Apache-Maven binary (mvn)... $MAVEN";
echo -e "Apache-Ant binary (ant)... $ANT";
Apache/2.4.62 (Debian) Server at ulfs.org Port 443