]> git.ipfire.org Git - people/ms/network.git/commitdiff
batman-adv: Make sure kernel module is loaded
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Aug 2017 12:28:16 +0000 (12:28 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Aug 2017 12:28:16 +0000 (12:28 +0000)
The kernel module must be loaded when creating a new device

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.batman-adv

index 23e88578a73c55c33818ad870167fdef9ffc72d5..f3c6d9f083934b7f38b403c465c8fd6e0a52ecbb 100644 (file)
 #                                                                             #
 ###############################################################################
 
-batman_adv_start() {
-       # Load the batman kernel module.
-       module_load "batman-adv"
-}
-
 batman_adv_add() {
        local device="${1}"
        assert isset device
 
+       # Make sure the kernel module is loaded
+       module_load "batman-adv"
+
        local cmd="ip link add name ${device} type batadv"
        cmd_quiet "${cmd}"
        local ret=$?
@@ -55,9 +53,6 @@ batman_adv_attach() {
        local port=${2}
        assert isset port
 
-       # Make sure, batman is running.
-       batman_adv_start
-
        device_set_master "${port}" "${device}"
 }