/etc/grml/lsb-functions: set RC_NOCOLOR if nocolor string is present in /proc/cmdline 0.2.34
authorMichael Prokop <mika@grml.org>
Sat, 17 Mar 2007 14:19:23 +0000 (15:19 +0100)
committerMichael Prokop <mika@grml.org>
Sat, 17 Mar 2007 14:19:23 +0000 (15:19 +0100)
debian/changelog
etc/grml/lsb-functions

index 74e4335..5d43ee2 100644 (file)
@@ -1,3 +1,10 @@
+grml-etc-core (0.2.34) unstable; urgency=low
+
+  * /etc/grml/lsb-functions: set RC_NOCOLOR if nocolor string is
+    present in /proc/cmdline
+
+ -- Michael Prokop <mika@grml.org>  Sat, 17 Mar 2007 15:17:45 +0100
+
 grml-etc-core (0.2.33) unstable; urgency=low
 
   * /etc/zsh/zshenv: fix sourcing of /etc/timezone
index 547db31..c21dd2c 100644 (file)
@@ -160,6 +160,9 @@ RC_QUIET_STDOUT="no"
 RC_VERBOSE="${RC_VERBOSE:-no}"
 
 # Should we use color?
+if [ -r /proc/cmdline ] ; then
+   grep -q ' nocolor' /proc/cmdline && RC_NOCOLOR='yes'
+fi
 RC_NOCOLOR="${RC_NOCOLOR:-no}"
 # Can the terminal handle endcols?
 RC_ENDCOL="yes"