FS-6267 I was able to replicate this issue, I've tweaked this to prevent -n
This commit is contained in:
parent
4fd93b0e67
commit
90b0ea7243
|
@ -2,30 +2,22 @@
|
||||||
|
|
||||||
PATH=$PATH:/bin:/usr/bin
|
PATH=$PATH:/bin:/usr/bin
|
||||||
mods=$1
|
mods=$1
|
||||||
|
on='[01;00;35m'
|
||||||
|
off='[0m'
|
||||||
|
|
||||||
if [ -z $mods ] ; then
|
if [ -z $mods ] ; then
|
||||||
mods="/usr/local/freeswitch/mod"
|
mods="/usr/local/freeswitch/mod"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Checking module integrity in target [$mods]"
|
echo "Checking module integrity in target [$mods]"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
here=`pwd`
|
here=`pwd`
|
||||||
|
|
||||||
cd $mods
|
cd $mods
|
||||||
files=`ls *.dylib *.so 2>/dev/null`
|
files=`ls *.dylib *.so 2>/dev/null`
|
||||||
cd $here
|
cd $here
|
||||||
|
|
||||||
alert() {
|
|
||||||
on='[01;00;35m'
|
|
||||||
off='[0m'
|
|
||||||
echo -n $on
|
|
||||||
echo WARNING: $1
|
|
||||||
echo -n $off
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $files ; do
|
for i in $files ; do
|
||||||
mod=${i%%.*}
|
mod=${i%%.*}
|
||||||
|
|
||||||
|
@ -33,9 +25,9 @@ for i in $files ; do
|
||||||
commented=`grep ^\#.*$mod\$ ../modules.conf`
|
commented=`grep ^\#.*$mod\$ ../modules.conf`
|
||||||
|
|
||||||
if [ -z "$infile" ] ; then
|
if [ -z "$infile" ] ; then
|
||||||
alert "installed module: $i was not installed by this build. It is not present in modules.conf."
|
echo "${on}WARNING: installed module: $i was not installed by this build. It is not present in modules.conf.${off}"
|
||||||
elif [ -n "$commented" ] ; then
|
elif [ -n "$commented" ] ; then
|
||||||
alert "installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]"
|
echo "${on}WARNING: installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]${off}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue