forked from freifunk-franken/firmware
Typo fixing and using -n option for batctl
This commit is contained in:
parent
517feb4002
commit
ef3c0f8fd4
|
@ -70,7 +70,7 @@ assign_router() {
|
|||
if [ `echo $ergebnis| cut '-d;' -f1` = "success" ]; then
|
||||
router_auto_assign_login_string=`echo $ergebnis| cut '-d;' -f2`
|
||||
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
|
||||
echo "`date`: There alredy exists a router with this login string: $router_auto_assign_login_string" >> $SCRIPT_LOGFILE
|
||||
echo "`date`: A router with the login string $router_auto_assign_login_string does exists. Trying to assign..." >> $SCRIPT_LOGFILE
|
||||
fi
|
||||
elif [ `echo $ergebnis| cut '-d;' -f1` = "error" ]; then
|
||||
router_auto_assign_login_string=`echo $login_strings| cut '-d;' -f1`
|
||||
|
@ -171,7 +171,7 @@ elif [ $CRAWL_METHOD == "hash" ]; then
|
|||
sync_hostname
|
||||
else
|
||||
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
|
||||
echo "`date`: The router is alredy assigned to a router in Netmon" >> $SCRIPT_LOGFILE
|
||||
echo "`date`: The router is already assigned to a router in Netmon" >> $SCRIPT_LOGFILE
|
||||
fi
|
||||
if [[ $AUTOADD_IPV6_ADDRESS = "1" ]]; then
|
||||
autoadd_ipv6_address
|
||||
|
|
|
@ -82,7 +82,7 @@ crawl() {
|
|||
fi
|
||||
if which batctl >/dev/null; then
|
||||
batctl_adv_version=`batctl -v | awk '{ print $2 }'`
|
||||
batman_adv_version=`batctl o|head -n1|awk '{ print $3 }'|sed 's/,//'`
|
||||
batman_adv_version=`batctl o -n|head -n1|awk '{ print $3 }'|sed 's/,//'`
|
||||
fi
|
||||
kernel_version=`uname -r`
|
||||
nodewatcher_version=$SCRIPT_VERSION
|
||||
|
@ -156,7 +156,6 @@ crawl() {
|
|||
echo "`date`: Collecting information from batman advanced and it´s interfaces" >> $SCRIPT_LOGFILE
|
||||
fi
|
||||
#B.A.T.M.A.N. advanced
|
||||
mv /tmp/bat-hosts /tmp/bat-hosts.tmp
|
||||
if which batctl >/dev/null; then
|
||||
batman_check_running=`batctl if | grep 'Error'`
|
||||
if [ "$batman_check_running" == "" ]; then
|
||||
|
@ -174,12 +173,12 @@ crawl() {
|
|||
done
|
||||
|
||||
if [ $has_active_interface = "1" ]; then
|
||||
BAT_ADV_ORIGINATORS=`batctl o | grep 'No batman nodes in range'`
|
||||
BAT_ADV_ORIGINATORS=`batctl o -n | grep 'No batman nodes in range'`
|
||||
if [ "$BAT_ADV_ORIGINATORS" == "" ]; then
|
||||
OLDIFS=$IFS
|
||||
IFS="
|
||||
"
|
||||
BAT_ADV_ORIGINATORS=`batctl o | awk '/O/ {next} /B/ {next} {print}'`
|
||||
BAT_ADV_ORIGINATORS=`batctl o -n | awk '/O/ {next} /B/ {next} {print}'`
|
||||
count=0;
|
||||
for row in $BAT_ADV_ORIGINATORS; do
|
||||
originator=`echo $row | awk '{print $1}'`
|
||||
|
@ -199,7 +198,6 @@ crawl() {
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
mv /tmp/bat-hosts.tmp /tmp/bat-hosts
|
||||
|
||||
if [ $SCRIPT_ERROR_LEVEL -gt "1" ]; then
|
||||
echo "`date`: Collecting information about conected clients" >> $SCRIPT_LOGFILE
|
||||
|
|
Loading…
Reference in New Issue