summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-11-05 06:31:33 +0000
committerChristian Heim <phreak@gentoo.org>2005-11-05 06:31:33 +0000
commitc19e259b2b3334adde61c3db89774b9db41b8704 (patch)
treed6aa04fd4bd07e9bb83abae6d63f7cb9c7b82c2f /net-scripts/net.modules.d/helpers.d/module-loader
parentMerging changes from baselayout 1583 (diff)
downloadbaselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.tar.gz
baselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.tar.bz2
baselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.zip
Merging changes between baselayout r1583 and r1596.
svn path=/baselayout-vserver/trunk/; revision=64
Diffstat (limited to 'net-scripts/net.modules.d/helpers.d/module-loader')
-rw-r--r--net-scripts/net.modules.d/helpers.d/module-loader26
1 files changed, 25 insertions, 1 deletions
diff --git a/net-scripts/net.modules.d/helpers.d/module-loader b/net-scripts/net.modules.d/helpers.d/module-loader
index f4f5f95..1434bbb 100644
--- a/net-scripts/net.modules.d/helpers.d/module-loader
+++ b/net-scripts/net.modules.d/helpers.d/module-loader
@@ -11,6 +11,15 @@
conf=$(add_suffix "/etc/conf.d/net")
[[ -e ${conf} ]] && source "${conf}"
+# Create some dummy functions, so we can depend on a module
+after() { return; }
+before() { return; }
+need() { return; }
+provide() { return; }
+installed() { return; }
+functions() { return; }
+variables() { eval "${MODULE}_variables() { echo \"$*\"; }"; }
+
# Guess which interface module to load - we prefer iproute2
if [[ -x /sbin/ip ]]; then
interface_module="iproute2"
@@ -34,14 +43,29 @@ MODULES=( "system" )
# Load our modules
. "${MODULES_DIR}/${interface_module}"
+MODULE="interface"
+${interface_module}_depend
function_wrap "${interface_module}" interface
-. "${MODULES_DIR}/macnet"
+
+if [[ -e "${MODULES_DIR}/macnet" ]]; then
+ . "${MODULES_DIR}/macnet"
+ MODULE="macnet"
+ macnet_depend
+fi
+
. "${MODULES_DIR}/system"
+MODULE="system"
+system_depend
if [[ -n ${wireless_module} ]]; then
. "${MODULES_DIR}/${wireless_module}"
+ MODULE="${wireless_module}"
+ ${wireless_module}_depend
function_wrap "${wireless_module}" wireless
. "${MODULES_DIR}/essidnet"
fi
+# Dummy dhcp
+dhcp_variables() { echo "dhcp"; }
+
# vim:ts=4