summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-05 21:01:00 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-05 21:01:00 +0000
commit7133d60ca341db9e5fe2d944708d8d3a871937c6 (patch)
tree764546ee906af0d396e5cec4434bbc0b7ebfffb1 /app-admin/metalog/files
parent~amd64 (diff)
downloadgentoo-2-7133d60ca341db9e5fe2d944708d8d3a871937c6.tar.gz
gentoo-2-7133d60ca341db9e5fe2d944708d8d3a871937c6.tar.bz2
gentoo-2-7133d60ca341db9e5fe2d944708d8d3a871937c6.zip
try a few diff tty names in case some dont exist #104894
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-admin/metalog/files')
-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