where did those come from
This commit is contained in:
parent
b5ebe89685
commit
97d4f0a0d6
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env watchman
|
|
||||||
|
|
||||||
service_command='/bin/agetty'
|
|
||||||
service_args="38400 ${service_name##*-} linux"
|
|
|
@ -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
|
|
|
@ -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:
|
|
|
@ -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:
|
|
|
@ -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:
|
|
Loading…
Reference in New Issue
Block a user