Clean up consoletype-related noise.

This commit is contained in:
Bill Nottingham 2011-09-19 17:49:02 -04:00
parent 52f41a0902
commit 11c17fbf37
3 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,25 @@
commit 09bfb5033230e6846414bc6002aa12ce09c23687
Author: Bill Nottingham <notting@redhat.com>
Date: Mon Sep 19 17:45:17 2011 -0400
Only bother with consoletype if we're actually connected to something that's console-ish. (#657869)
If we're connected to a socket, or a pipe, or a file, or anything else - assume dumb mode.
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 79545b5..e313e35 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -54,10 +54,10 @@ systemctl_redirect () {
[ -z "${COLUMNS:-}" ] && COLUMNS=80
if [ -z "${CONSOLETYPE:-}" ]; then
- if [ -r "/dev/stderr" ]; then
+ if [ -c "/dev/stderr" ]; then
CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
else
- CONSOLETYPE="$(/sbin/consoletype 2>/dev/null)"
+ CONSOLETYPE="serial"
fi
fi

View File

@ -8,7 +8,7 @@ Version: 9.32
# ppp-watch is GPLv2+, everything else is GPLv2 # ppp-watch is GPLv2+, everything else is GPLv2
License: GPLv2 and GPLv2+ License: GPLv2 and GPLv2+
Group: System Environment/Base Group: System Environment/Base
Release: 1%{?dist} Release: 2%{?dist}
URL: http://fedorahosted.org/releases/i/n/initscripts/ URL: http://fedorahosted.org/releases/i/n/initscripts/
Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2 Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -61,6 +61,7 @@ Requires(pre): /usr/sbin/groupadd
Requires(post): /sbin/chkconfig, coreutils Requires(post): /sbin/chkconfig, coreutils
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
BuildRequires: glib2-devel popt-devel gettext pkgconfig BuildRequires: glib2-devel popt-devel gettext pkgconfig
Patch1: 09bfb5033230e6846414bc6002aa12ce09c23687.patch
%description %description
The initscripts package contains the basic system scripts used to boot The initscripts package contains the basic system scripts used to boot
@ -90,6 +91,7 @@ Currently, this consists of various memory checking code.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
make make
@ -317,6 +319,9 @@ rm -rf $RPM_BUILD_ROOT
/etc/profile.d/debug* /etc/profile.d/debug*
%changelog %changelog
* Mon Sep 19 2011 Bill Nottingham <notting@redhat.com> - 9.32-2
- clean up consoletype-related error messages (#735618)
* Fri Sep 2 2011 Bill Nottingham <notting@redhat.com> - 9.32-1 * Fri Sep 2 2011 Bill Nottingham <notting@redhat.com> - 9.32-1
- prefdm: if exec() of all DMs fails, call 'plymouth quit' (#735215) - prefdm: if exec() of all DMs fails, call 'plymouth quit' (#735215)
- %%ghost rc.local (but leave it around on upgrade) (#734268) - %%ghost rc.local (but leave it around on upgrade) (#734268)

View File

@ -1,3 +1 @@
504d559c387e9d81101a7422fa933820 initscripts-9.30.tar.bz2
885929d864bebdd59c37734ea36f1698 initscripts-9.31.tar.bz2
4a8c9d2d860ed142b4c84d924ff4b812 initscripts-9.32.tar.bz2 4a8c9d2d860ed142b4c84d924ff4b812 initscripts-9.32.tar.bz2