From: Michael Tremer Date: Sun, 6 Aug 2017 12:28:16 +0000 (+0000) Subject: batman-adv: Make sure kernel module is loaded X-Git-Tag: 009~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f741def61e12df29db5ebedb966cca0c25fecf8;p=network.git batman-adv: Make sure kernel module is loaded The kernel module must be loaded when creating a new device Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.batman-adv b/src/functions/functions.batman-adv index 23e88578..f3c6d9f0 100644 --- a/src/functions/functions.batman-adv +++ b/src/functions/functions.batman-adv @@ -19,15 +19,13 @@ # # ############################################################################### -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}" }