Sindbad~EG File Manager
Current Path : /var/lib/dpkg/info/ |
|
Current File : /var/lib/dpkg/info/omsconfig.preinst |
#!/bin/sh
PREREQ_ERROR=0
LIBCURL_SO=`ldconfig -p | grep "libcurl" | awk -F ">" '{print $2}' | awk -F " " '{print $1; exit 0}'`
if [ -z "$LIBCURL_SO" ]; then
echo "Error: Please install curl."
PREREQ_ERROR=1
fi
# test for availablity of gpg
which gpg 1> /dev/null 2> /dev/null
if [ $? -ne 0 ]; then
echo "Error: gpg needs to be installed and available in PATH"
PREREQ_ERROR=1
fi
if [ $PREREQ_ERROR -eq 1 ]; then
exit 1
fi
echo "Checking for ctypes python module..."
python -c "import ctypes" 1> /dev/null 2> /dev/null
cmdline_ctypes=$?
if [ $cmdline_ctypes -ne 0 ]; then
echo "Error: Python does not support ctypes on this system. Please install the ctypes module for Python or upgrade to a newer version of python that comes with the ctypes module."
echo "Please remove the omi package and try again after installing the ctypes module or upgrading Python. You can check if the ctypes module is installed by starting python and running the command: 'import ctypes'"
exit 1
fi
echo "Cleanning up existing dsc_hosts..."
kill $(ps -eo pid,cmd | grep '/opt/dsc/bin/dsc_host' | grep -v grep | tr -s ' ' | sed 's/^[ \t]*//' | cut -d' ' -f1) -9 2&>1 > /dev/null
chmod -R 777 /opt/dsc
rm -rfv /opt/dsc
rm -f /etc/opt/omi/conf/omsconfig/inventory_lock
echo "Cleaned up existing dsc_hosts..."
exit 0
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists