/etc/rc.d/init.d/functions calls /sbin/consoletype without specifying stdout. I.e.:<br />
<br />
[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)"<br />
<br />
This causes consoletype to return non-zero. This is a problem if functions is sourced from an init script with -e set. This is also a problem under CentOS7.<br />
<br />
The easy fix is:<br />
<br />
--- /etc/rc.d/init.d/functions 2014-07-10 09:47:26.000000000 -0400<br />
+++ /etc/rc.d/init.d/functions.new 2014-10-15 17:36:00.289848758 -0400<br />
@@ -16,7 +16,7 @@<br />
# Get a sane screen width<br />
[ -z "${COLUMNS:-}" ] && COLUMNS=80<br />
<br />
-[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)"<br />
+[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype stdout)"<br />
<br />
if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" -a -z "${LANGSH_SOURCED:-}" ] ; then<br />
. /etc/profile.d/lang.sh 2>/dev/null
↧