diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-08 01:04:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-08 01:04:02 +0000 |
commit | 120d46e461fae7960bbfdc0e77e8cc1373490d5b (patch) | |
tree | f7e6959f5d62cc7f2eb91576915e6ab4aad2040e /app-admin/metalog/files | |
parent | Version bump. (diff) | |
download | gentoo-2-120d46e461fae7960bbfdc0e77e8cc1373490d5b.tar.gz gentoo-2-120d46e461fae7960bbfdc0e77e8cc1373490d5b.tar.bz2 gentoo-2-120d46e461fae7960bbfdc0e77e8cc1373490d5b.zip |
Allow people to control consolelog.sh from the conf.d file as that is under CONFIG_PROTECT and get rid of all the magic voodoo which just screws up packages (see #96038 by Martin von Gagern and #113359 by Daniel).
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'app-admin/metalog/files')
-rw-r--r-- | app-admin/metalog/files/consolelog.sh | 27 | ||||
-rw-r--r-- | app-admin/metalog/files/digest-metalog-0.8_rc1-r2 | 1 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog.conf | 4 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog.confd | 12 |
4 files changed, 23 insertions, 21 deletions
diff --git a/app-admin/metalog/files/consolelog.sh b/app-admin/metalog/files/consolelog.sh index 82bee8307a69..429208815873 100644 --- a/app-admin/metalog/files/consolelog.sh +++ b/app-admin/metalog/files/consolelog.sh @@ -1,25 +1,16 @@ #!/bin/sh -# # consolelog.sh # For metalog -- log to a console -# -# from LFS -# -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 +source /etc/conf.d/metalog +if [ -z "${CONSOLE}" ] ; then + CONSOLE="/dev/console" fi -echo "$1 [$2] $3" > ${console} +if [ -z "${FORMAT}" ] ; then + FORMAT='$1 [$2] $3' +fi -# -# of course, you can log to multiple devices -# -#echo "$1 [$2] $3" >/dev/console +for d in ${CONSOLE} ; do + eval echo ${FORMAT} ${d} +done diff --git a/app-admin/metalog/files/digest-metalog-0.8_rc1-r2 b/app-admin/metalog/files/digest-metalog-0.8_rc1-r2 new file mode 100644 index 000000000000..903d504ae581 --- /dev/null +++ b/app-admin/metalog/files/digest-metalog-0.8_rc1-r2 @@ -0,0 +1 @@ +MD5 f52d8e795b38dfa49d475cacb8995d10 metalog-0.8-rc1.tar.gz 121744 diff --git a/app-admin/metalog/files/metalog.conf b/app-admin/metalog/files/metalog.conf index ab1e9bd43289..ca8f888a4813 100644 --- a/app-admin/metalog/files/metalog.conf +++ b/app-admin/metalog/files/metalog.conf @@ -1,4 +1,4 @@ -# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.conf,v 1.5 2005/03/15 03:31:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.conf,v 1.6 2006/02/08 01:04:02 vapier Exp $ # # Sample Metalog configuration file @@ -82,7 +82,7 @@ Everything very important : #your needs to enable console logging # # Hint: you can change the device to which -# should be logged in /usr/sbin/consolelog.sh +# should be logged in /etc/conf.d/metalog # #console logging : diff --git a/app-admin/metalog/files/metalog.confd b/app-admin/metalog/files/metalog.confd index ea7a42d6da69..caa5918d3056 100644 --- a/app-admin/metalog/files/metalog.confd +++ b/app-admin/metalog/files/metalog.confd @@ -1,5 +1,5 @@ # /etc/conf.d/metalog -# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.confd,v 1.6 2005/03/15 03:21:34 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.confd,v 1.7 2006/02/08 01:04:02 vapier Exp $ # Some useful options: # -a Log with buffering @@ -7,3 +7,13 @@ # See `metalog --help` for more METALOG_OPTS="" + + +# Options used by /usr/sbin/consolelog.sh + +# Space delimited list of devices to write "console" messages to +#CONSOLE="/dev/console /dev/tty10" +CONSOLE="/dev/tty10" + +# Format of logging (make sure you use single quotes) +FORMAT='$1 [$2] $3' |