2014-02-21 16:42:41 -05:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
PATH=$PATH:/bin:/usr/bin
|
|
|
|
|
mods=$1
|
2014-02-25 09:44:54 -05:00
|
|
|
|
on='[01;00;35m'
|
|
|
|
|
off='[0m'
|
2014-02-21 16:42:41 -05:00
|
|
|
|
|
|
|
|
|
if [ -z $mods ] ; then
|
|
|
|
|
mods="/usr/local/freeswitch/mod"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Checking module integrity in target [$mods]"
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
here=`pwd`
|
|
|
|
|
|
|
|
|
|
cd $mods
|
2014-06-20 11:18:10 -04:00
|
|
|
|
files=`ls *.so 2>/dev/null`
|
2014-02-21 16:42:41 -05:00
|
|
|
|
cd $here
|
|
|
|
|
|
|
|
|
|
for i in $files ; do
|
|
|
|
|
mod=${i%%.*}
|
|
|
|
|
|
2021-08-19 12:32:18 -04:00
|
|
|
|
infile=`grep -E "^.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_`
|
|
|
|
|
commented=`grep -E "^\#.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_`
|
2014-02-21 16:42:41 -05:00
|
|
|
|
|
|
|
|
|
if [ -z "$infile" ] ; then
|
2014-02-25 09:44:54 -05:00
|
|
|
|
echo "${on}WARNING: installed module: $i was not installed by this build. It is not present in modules.conf.${off}"
|
2014-02-21 16:42:41 -05:00
|
|
|
|
elif [ -n "$commented" ] ; then
|
2014-02-25 09:44:54 -05:00
|
|
|
|
echo "${on}WARNING: installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]${off}"
|
2014-02-21 16:42:41 -05:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo
|