summaryrefslogtreecommitdiffstats
path: root/rc.wireless
diff options
context:
space:
mode:
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