Summary: | runscript always outputs color; color codes getting into system log | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Todd Heim (RETIRED) <heim> |
Component: | [OLD] Core system | Assignee: | Martin Schlemmer (RETIRED) <azarah> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | latexer |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Todd Heim (RETIRED)
![]() Please rather call it with '/etc/init.d/net.eth1 --quiet start'. If it is a package in portage, please reassign this bug. Hello? I just now realize a handfull of bugzilla post I made the other day did not appear in bugzilla... calling the init script with -quiet is one option, although possibly not the best solution, I think it'd still be a good idea to log the status "OK/!!!" of the wireless interface. Seems simple enough for a -nc option to be added. all this option would need to do is unset some variables set by functions.sh: NORMAL="\033[0m" GOOD=$'\e[32;01m' WARN=$'\e[33;01m' BAD=$'\e[31;01m' NORMAL=$'\e[0m' HILITE=$'\e[36;01m' parsing for --quiet in runscript.sh becomes: for arg in $* do case "${arg}" in --quiet) QUIET_STDOUT="yes" ;; -nc) unset NORMAL GOOD WARN BAD NORMAL HILIGHT ;; esac done With more thought into it, it seems kind of hacked together that the colors are set in functions.sh, anyways. Maybe the portion where the color codes are set should be moved into a function, that checks for NOCOLOR=true being set either by make.conf or an added -nc option to runscript.sh Hrm .. my thougts on it was that you would normally just want things in the system log, if it failed. Same with a cron job ... I always had it that you write a cron job to be totally quiet "except" when there is an error, in which case the admin should be mailed. Comments ? You do have a point about only logging on failure, but cardmgr seems to want to log *everything*. here is an example of what happens when inserting and removing a wifi card: log-2003-03-18-18:03:34:Mar 17 11:27:40 [cardmgr] socket 1: Netgear MA401RA Wireless Adapter log-2003-03-18-18:03:34:Mar 17 11:27:41 [cardmgr] executing: 'modprobe hermes' log-2003-03-18-18:03:34:Mar 17 11:27:41 [cardmgr] executing: 'modprobe orinoco' log-2003-03-18-18:03:34:Mar 17 11:27:41 [cardmgr] executing: 'modprobe orinoco_cs' log-2003-03-18-18:03:34:Mar 17 11:27:41 [cardmgr] executing: './network start eth1' log-2003-03-18-18:03:34:Mar 17 11:27:41 [cardmgr] + [32;01m* [0m Bringing eth1 up... log-2003-03-18-18:03:34:Mar 17 11:27:46 [cardmgr] + [A [-7G [34;01m[ [32;01mok [34;01m] [0m log-2003-03-18-18:03:34:Mar 17 11:44:24 [cardmgr] executing: './network suspend eth1' log-2003-03-18-18:03:34:Mar 17 11:44:49 [cardmgr] executing: './network stop eth1' log-2003-03-18-18:03:34:Mar 17 11:44:49 [cardmgr] + [32;01m* [0m Bringing eth1 down... log-2003-03-18-18:03:34:Mar 17 11:44:54 [cardmgr] + [32;01m* [0m Waiting for dhcpcd to shutdown.....done log-2003-03-18-18:03:34:Mar 17 11:44:54 [cardmgr] + [A [-7G [34;01m[ [32;01mok [34;01m] [0m log-2003-03-18-18:03:34:Mar 17 11:44:54 [cardmgr] executing: 'modprobe -r orinoco_cs' maybe this should be filed as a cardmgr bug, for breaking "protocol" on logging? maybe it needs a DEBUG=yes/no option to quieten its logging unless there are troubles? Possibly. The --quiet should at least resolve that partly. What package is cardmgr a part of ? I am not on top of notebook stuff, so need to know where cardmgr comes from to be able to fix. cardmgr is part of sys-apps/pcmcia-cs Guys, please call initscripts with '--quiet'. --quiet doesn't help when you WANT to see that "[OK]" string in the syslog, but you DON'T WANT to see colors. What was the reason to disable --nocolor ? Actually there is a --nocolor: -- 06 Apr 2003; Martin Schlemmer <azarah@gentoo.org>: Hopefully get the serial support sane again. Added /bin/consoletype from Redhat to check for serial console. This should resolve bug #18329 partly. Add the --nocolor option to suppress the use of colors. -- giving: -- nosferatu transcode-0.6.10 # /etc/init.d/local --nocolor restart * Stopping gpm... [ ok ] * Stopping local... [ ok ] * Starting local... [ ok ] * Starting gpm... [ ok ] nosferatu transcode-0.6.10 # /etc/init.d/local restart * Stopping gpm... [ ok ] * Stopping local... [ ok ] * Starting local... [ ok ] * Starting gpm... [ ok ]nosferatu transcode-0.6.10 # -- And thus working as you can see ... Resolution, add --nocolor to initscript calls. For no apparent reason, this bug was never closed |