summaryrefslogtreecommitdiffstats
path: root/rc.wireless
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2019-11-11 02:25:51 +0000
committerDarren 'Tadgy' Austin <darren@afterdark.org.uk>2019-11-11 02:25:51 +0000
commit63ee3db06be3f43ca63873e75f28cd2223bcfa32 (patch)
tree0b2d5320f44ed382e32dc7442a2a514a3c3e4c73 /rc.wireless
parent33e35cb8b48d3f7382a6c1ee3fba5f665ffe7c70 (diff)
downloadslacknetsetup-63ee3db06be3f43ca63873e75f28cd2223bcfa32.tar.xz
VLAN support. Sync logging/IPv6 changes from tadgy-ipv6-fixes branch.
rc.inet1: * VLAN support added to rc.inet1{,.conf}. * Created new info_log function to replace $LOGGING variable. * When logging to syslog, use a tag of 'rc.inet1' with PID. * Decrease script noisyness at non-debug levels. * Add more debugging logging for testing. * Use -4 when configuring IPv4 loopback address. * Configure ::1 for IPv6 loopbacking. * Use 'local' not 'declare' in functions. * Move where DAD is disabled when setting IPv6 addresses. * Add error checking to some calls to 'ip'. * Walk backwards through interfaces when deconfiguring. rc.wireless: * Log to syslog, failling back to stdout. * Output error to stderr if not called from rc.inet1. Manpages and netconfig: * Updated for new VLAN support.
Diffstat (limited to 'rc.wireless')
-rw-r--r--rc.wireless11
1 files changed, 8 insertions, 3 deletions
diff --git a/rc.wireless b/rc.wireless
index 1b4b6f9..1fa02bd 100644
--- a/rc.wireless
+++ b/rc.wireless
@@ -60,11 +60,16 @@
# Convert the MAC address to uppercase in sed.
# ------------------------------------------------------------------------------
-LOGGER=${LOGGER:-cat}
+# If possible, log events in /var/log/messages:
+if [ -f /var/run/syslogd.pid ] && [ -x /usr/bin/logger ]; then
+ LOGGER=/usr/bin/logger
+else # output to stdout/stderr:
+ LOGGER=/bin/cat
+fi
if [ -z "$IFNAME" ] ; then
- echo "WARNING: The script 'rc.wireless' must be executed by 'rc.inet1'!" | $LOGGER
- echo " You should run the command \"/etc/rc.d/rc.inet1 <your_interface>_start\" yourself." | $LOGGER
+ echo "ERROR: The script 'rc.wireless' must be executed by 'rc.inet1'!" >&2
+ echo " You should run the command \"/etc/rc.d/rc.inet1 <your_interface>_start\" yourself." >&2
return 1 2> /dev/null || exit 1
fi