olsr: hotplug: fix a wrong grep (never successful) in olsrd_interface_already_in_config()

This commit is contained in:
Bastian Bittorf 2017-02-12 20:41:04 +01:00
parent 67939e59a2
commit 824f1a68e3
1 changed files with 2 additions and 2 deletions

View File

@ -15,14 +15,14 @@ olsrd_list_configured_interfaces()
;; ;;
esac esac
i=$(( $i + 1 )) i=$(( i + 1 ))
} done } done
} }
olsrd_interface_already_in_config() olsrd_interface_already_in_config()
{ {
# e.g.: 'Interface "eth0.1" "eth0.2" "wlan0"' # e.g.: 'Interface "eth0.1" "eth0.2" "wlan0"'
if grep -s ^'Interface ' '/var/etc/$OLSRD.conf' | grep -q "\"$DEVICE\""; then if grep -s ^'Interface ' "/var/etc/$OLSRD.conf" | grep -q "\"$DEVICE\""; then
logger -t olsrd_hotplug -p daemon.debug "[OK] already_active: '$INTERFACE' => '$DEVICE'" logger -t olsrd_hotplug -p daemon.debug "[OK] already_active: '$INTERFACE' => '$DEVICE'"
return 0 return 0
else else