summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-admin/metalog/files/consolelog.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/app-admin/metalog/files/consolelog.sh b/app-admin/metalog/files/consolelog.sh
index 698fce5bbae3..82bee8307a69 100644
--- a/app-admin/metalog/files/consolelog.sh
+++ b/app-admin/metalog/files/consolelog.sh
@@ -6,7 +6,18 @@
# from LFS
#
-echo "$1 [$2] $3" >/dev/vc/10
+console=""
+for d in /dev/vc/10 /dev/tty10 /dev/console ; do
+ if [ -e ${d} ] ; then
+ console=${d}
+ break
+ fi
+done
+if [ -z "${console}" ] ; then
+ exit 1
+fi
+
+echo "$1 [$2] $3" > ${console}
#
# of course, you can log to multiple devices