Browse Source

When loading the kernel module, marshal into the module the list of interfaces that we want to run AoE over.

David Martínez Moreno 14 years ago
parent
commit
5f90ab1706
2 changed files with 8 additions and 3 deletions
  1. 1 1
      debian/aoetools.default
  2. 7 2
      debian/aoetools.init

+ 1 - 1
debian/aoetools.default

@@ -1,7 +1,7 @@
 # Configuration file for aoetools.
 
 # Enter the list of network interfaces to restrict the AoE discovery to, separated by spaces.
-# It can be blank, i.e. "".
+# It can be blank, i.e. "", if you want to run AoE over all the interfaces.
 # If you do not want AoE discovery at all, enter "none" as the list of interfaces.
 #
 # If neither the aoe_iflist module load option nor this list of interfaces are used, the aoe driver

+ 7 - 2
debian/aoetools.init

@@ -77,7 +77,12 @@ do_start() {
     fi
 
     # Usually aoe is a module, so we will try to load it.
-    modprobe aoe >/dev/null 2>&1 || true
+    if [ -n "$INTERFACES" ]
+    then
+        modprobe aoe aoe_iflist="$INTERFACES" >/dev/null 2>&1 || true
+    else
+        modprobe aoe >/dev/null 2>&1 || true
+    fi
 
     # Also, if udev is being used, the /dev/etherd devices
     # are not created until aoe module insertion, so...
@@ -112,7 +117,7 @@ do_start() {
         echo
         echo "The LVM2 tools are not present.  Please install lvm2 package and try again." >&2
         echo "We will not honour LVMGROUPS." >&2
-        LMVGROUPS=""
+        LMVGROUPS=''
     fi
 
     if [ -n "$LVMGROUPS" ]