diff options
Diffstat (limited to 'net-scripts/net.modules.d/helpers.d/module-loader')
-rw-r--r-- | net-scripts/net.modules.d/helpers.d/module-loader | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/net-scripts/net.modules.d/helpers.d/module-loader b/net-scripts/net.modules.d/helpers.d/module-loader deleted file mode 100644 index e0477d4..0000000 --- a/net-scripts/net.modules.d/helpers.d/module-loader +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) 2004-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Contributed by Roy Marples (uberlord@gentoo.org) - -source "${svclib}/sh/rc-services.sh" - -MODULES_DIR="${svclib}/net.modules.d" -source "${MODULES_DIR}/system" -source "${MODULES_DIR}/helpers.d/functions" - -conf="$(add_suffix /etc/conf.d/net)" -[[ -e ${conf} ]] && source "${conf}" -conf="$(add_suffix "/etc/conf.d/net.${interface}")" -[[ -e ${conf} ]] && source "${conf}" - -# So we can expose module variables -variables() { eval "${MODULE}_variables() { echo \"$*\"; }"; } - -# Guess which interface module to load - we prefer iproute2 -if [[ -x /sbin/ip ]] ; then - interface_module="iproute2" -elif [[ -x /sbin/ifconfig ]] ; then - interface_module="ifconfig" -else - echo "Can't find a known interface module" >&2 - exit 1 -fi - -# iwconfig is the best bet for wireless - we use wpa_supplicant -# only if we need to -if [[ -x /sbin/iwconfig ]] ; then - wireless_module="iwconfig" -elif [[ -x /sbin/wpa_supplicant \ - && -S "/var/run/wpa_supplicant/${interface}" ]] ; then - wireless_module="wpa_supplicant" -fi - -MODULES=( "system" ) - -# Load our modules -source "${MODULES_DIR}/${interface_module}" -MODULE="interface" -${interface_module}_expose -function_wrap "${interface_module}" interface - -if [[ -e "${MODULES_DIR}/macnet" ]] ; then - source "${MODULES_DIR}/macnet" -fi - -. "${MODULES_DIR}/system" -MODULE="system" -system_expose - -if [[ -n ${wireless_module} ]] ; then - source "${MODULES_DIR}/${wireless_module}" - function_wrap "${wireless_module}" wireless - source "${MODULES_DIR}/essidnet" -fi - -# Dummy dhcp -dhcp_variables() { echo "dhcp"; } - -# vim: set ft=sh ts=4 : |