From 63ee3db06be3f43ca63873e75f28cd2223bcfa32 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Mon, 11 Nov 2019 02:25:51 +0000 Subject: 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. --- rc.wireless | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'rc.wireless') 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 _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 _start\" yourself." >&2 return 1 2> /dev/null || exit 1 fi -- cgit v1.2.3