|
@@ -9,14 +9,14 @@
|
|
|
# Modified for aoetools by David Martínez Moreno <ender@debian.org>.
|
|
|
#
|
|
|
### BEGIN INIT INFO
|
|
|
-# Provides: mountaoe
|
|
|
+# Provides: aoe
|
|
|
# Required-Start: $local_fs $network
|
|
|
# Required-Stop: $local_fs $network
|
|
|
# Should-Start:
|
|
|
# Default-Start: S
|
|
|
# Default-Stop: 0 6
|
|
|
# Short-Description: Begin AoE discovery and mount related filesystems.
|
|
|
-# Description: Begin AoE discovery and mount filesystems residing.
|
|
|
+# Description: Begin AoE discovery and mount filesystems residing
|
|
|
# on AoE volumes.
|
|
|
### END INIT INFO
|
|
|
|
|
@@ -35,6 +35,18 @@ fi
|
|
|
set -e
|
|
|
|
|
|
do_start() {
|
|
|
+ # We exit if the user do not want us to try this.
|
|
|
+ if [ "$INTERFACES" = "none" ]
|
|
|
+ then
|
|
|
+ echo "not started."
|
|
|
+ exit 0
|
|
|
+ fi
|
|
|
+
|
|
|
+ # Usually aoe is a module, so we will try to load it.
|
|
|
+ # Also, if udev is being used, the /dev/etherd devices
|
|
|
+ # are not created until aoe module insertion.
|
|
|
+ modprobe aoe >/dev/null 2>&1 || true
|
|
|
+
|
|
|
if [ ! -c /dev/etherd/discover ]
|
|
|
then
|
|
|
echo "Missing devices under /dev/etherd/. Please run" >&2
|
|
@@ -43,13 +55,6 @@ do_start() {
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
- # We exit if the user do not want us to try this.
|
|
|
- if [ "$INTERFACES" = "none" ]
|
|
|
- then
|
|
|
- echo "not started."
|
|
|
- exit 0
|
|
|
- fi
|
|
|
-
|
|
|
# Try to set up interfaces for discovery, if any.
|
|
|
if [ ! -z "$INTERFACES" ]
|
|
|
then
|