summaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/net-auto-wired62
-rwxr-xr-xrc.d/net-auto-wireless61
-rwxr-xr-xrc.d/net-profiles55
-rwxr-xr-xrc.d/net-rename28
-rw-r--r--rc.d/net-set-variable10
5 files changed, 0 insertions, 216 deletions
diff --git a/rc.d/net-auto-wired b/rc.d/net-auto-wired
deleted file mode 100755
index 807bb22..0000000
--- a/rc.d/net-auto-wired
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /usr/lib/network/globals
-. /etc/conf.d/netcfg
-
-if [[ ! -x /usr/bin/ifplugd ]]; then
- exit_stderr "Please install 'ifplugd' to use net-auto-wired"
-fi
-
-if [[ -z "${WIRED_INTERFACE}" ]]; then
- exit_stderr "No interface name set. Add to /etc/conf.d/netcfg a line"$'\n' \
- " WIRED_INTERFACE='your_interface'"
-fi
-
-CFG=/etc/ifplugd/ifplugd.conf
-ACTION=/etc/ifplugd/netcfg.action
-PIDFILE=/var/run/ifplugd.$WIRED_INTERFACE.pid
-[[ -f $PIDFILE ]] && read PID < $PIDFILE
-
-# Source ifplugd configuration
-[ -f $CFG ] && . $CFG
-
-case "$1" in
- start)
- if ! ck_daemon net-auto-wired; then
- exit_stderr "net-auto-wired has already been started: try \"/etc/rc.d/net-auto-wired restart\""
- fi
- stat_busy "Starting netcfg auto-wired mode for interface ${WIRED_INTERFACE}"
- A="`eval echo \$\{ARGS_${WIRED_INTERFACE}\}`"
- [[ "$A" ]] || A="$ARGS"
- [[ "$PID" ]] || /usr/bin/ifplugd -i $WIRED_INTERFACE -r $ACTION $A
- # ifplugd may return non-zero, but still succeed if -w is passed, as default in upstream config.
- sleep 1
- if [[ -f $PIDFILE ]]; then
- add_daemon net-auto-wired
- stat_done
- else
- stat_fail
- fi
- ;;
- stop)
- if ! ck_daemon net-auto-wired; then
- stat_busy "Stopping netcfg auto-wired mode for interface ${WIRED_INTERFACE}"
- if [[ "$PID" ]] && /usr/bin/ifplugd -k -i $WIRED_INTERFACE -r $ACTION; then
- rm_daemon net-auto-wired
- stat_done
- else
- stat_fail
- fi
- fi
- ;;
- restart)
- "$0" stop
- sleep 1
- "$0" start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/rc.d/net-auto-wireless b/rc.d/net-auto-wireless
deleted file mode 100755
index 9094232..0000000
--- a/rc.d/net-auto-wireless
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /usr/lib/network/globals
-. /etc/conf.d/netcfg
-
-if [[ ! -x /usr/sbin/wpa_actiond ]]; then
- exit_stderr "Please install 'wpa_actiond' to use net-auto-wireless"
-fi
-
-if [[ -z "${WIRELESS_INTERFACE}" ]]; then
- exit_stderr "No interface name set. Add to /etc/conf.d/netcfg a line"$'\n' \
- " WIRELESS_INTERFACE='your_interface'"
-fi
-
-case "$1" in
- start)
- if ! ck_daemon net-auto-wireless; then
- exit_stderr "net-auto-wireless has already been started: try \"/etc/rc.d/net-auto-wireless restart\""
- fi
- # Ensure any device renaming has occurred as intended
- for daemon in "${DAEMONS[@]}"; do
- if [[ "$daemon" = "net-rename" ]]; then
- if ck_daemon net-rename; then
- /etc/rc.d/net-rename start
- fi
- fi
- done
-
- stat_busy "Starting netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}"
- if /usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null; then
- add_daemon net-auto-wireless
- stat_done
- else
- stat_fail
- fi
- ;;
- stop)
- if ! ck_daemon net-auto-wireless; then
- stat_busy "Stopping netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}"
- if /usr/bin/netcfg-wpa_actiond stop "${WIRELESS_INTERFACE}" >/dev/null; then
- rm_daemon net-auto-wireless
- stat_done
- else
- stat_fail
- fi
- fi
- ;;
- restart)
- "$0" stop
- sleep 1
- "$0" start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
-esac
-exit 0
-# vim: ft=sh ts=4 et sw=4:
diff --git a/rc.d/net-profiles b/rc.d/net-profiles
deleted file mode 100755
index ae9c00e..0000000
--- a/rc.d/net-profiles
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# This script utilizes netcfg-daemon.
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /usr/lib/network/globals
-
-case "$1" in
- start)
- if ! ck_daemon net-profiles; then
- exit_stderr "net-profiles has already been started. Try '/etc/rc.d/net-profiles restart'"
- fi
-
- # Ensure any device renaming has occurred as intended
- for daemon in "${DAEMONS[@]}"; do
- if [[ $daemon = net-rename ]]; then
- if ck_daemon net-rename; then
- /etc/rc.d/net-rename start
- fi
- fi
- done
-
- # $NET env var is passed from the kernel boot line
- if [[ -n $NET ]]; then
- # Record the connected profile for net-profiles stop
- if [[ $NET = menu ]]; then
- /usr/bin/netcfg-menu || exit 1
- mv "$STATE_DIR"/{menu,netcfg-daemon}
- else
- /usr/bin/netcfg check-iface "$NET" || exit 1
- echo "$NET" > "$STATE_DIR/netcfg-daemon"
- fi
- elif ! /usr/bin/netcfg-daemon start; then
- exit_err "No profile started."
- fi
- add_daemon net-profiles
- ;;
- stop)
- if ck_daemon net-profiles; then
- exit_stderr "net-profiles is not running"
- fi
- /usr/bin/netcfg-daemon stop
- rm_daemon net-profiles
- ;;
- restart)
- "$0" stop
- sleep 1
- "$0" start
- ;;
- *)
- exit_stderr "Usage: $0 {start|stop|restart}"
-esac
-
-# vim: ft=sh ts=4 et sw=4:
diff --git a/rc.d/net-rename b/rc.d/net-rename
deleted file mode 100755
index 42dfa23..0000000
--- a/rc.d/net-rename
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /usr/lib/network/globals
-
-case "$1" in
- start)
- report_try "Renaming network devices"
- ifrename -p -t
- report_success
-
- add_daemon net-rename
- ;;
- stop)
- rm_daemon net-rename
- # No stop neccesary, but add one to look nice on shutdown.
- /bin/true
- ;;
- restart)
- "$0" start
- ;;
- *)
- exit_stderr "Usage: $0 {start|stop|restart}"
- ;;
-esac
-
-# vim: ft=sh ts=4 et sw=4:
diff --git a/rc.d/net-set-variable b/rc.d/net-set-variable
deleted file mode 100644
index d2d68fa..0000000
--- a/rc.d/net-set-variable
+++ /dev/null
@@ -1,10 +0,0 @@
-# Set the NET variable if specified on the kernel command line.
-
-net_set_variable() {
- local re="\<NET=([^ ]+)\>"
- if [[ -f /proc/cmdline && $(< /proc/cmdline) =~ $re ]]; then
- export NET=${BASH_REMATCH[1]}
- fi
-}
-
-add_hook multi_start net_set_variable