olsrd: hotplug-script: bugfix: move function calls down, otherwise the functions are not known yet (thanks bluse-bluw for reporting)

This commit is contained in:
Bastian Bittorf 2013-09-25 16:42:24 +02:00
parent 8ffcb5e3e5
commit af1b35bd80
1 changed files with 10 additions and 10 deletions

View File

@ -1,15 +1,5 @@
#!/bin/sh
case "$ACTION" in
ifup)
/etc/init.d/olsrd enabled && {
olsrd_interface_needs_adding "$INTERFACE" "$DEVICE" && {
/etc/init.d/olsrd restart
}
}
;;
esac
olsrd_list_configured_interfaces()
{
local i=0
@ -51,3 +41,13 @@ olsrd_interface_needs_adding()
logger -t olsrd_hotplug -p daemon.debug "[OK] interface $INTERFACE not used for olsrd"
return 1
}
case "$ACTION" in
ifup)
/etc/init.d/olsrd enabled && {
olsrd_interface_needs_adding "$INTERFACE" "$DEVICE" && {
/etc/init.d/olsrd restart
}
}
;;
esac