olsrd: hotplug-script: bugfix: move function calls down, otherwise the functions...
authorBastian Bittorf <bittorf@bluebottle.com>
Wed, 25 Sep 2013 14:42:24 +0000 (16:42 +0200)
committerBastian Bittorf <bittorf@bluebottle.com>
Wed, 25 Sep 2013 14:42:24 +0000 (16:42 +0200)
olsrd/files/olsrd.hotplug.sh

index 8d88737..6d1641f 100755 (executable)
@@ -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