Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [configuration] |
| 2 | |
| 3 | Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> |
| 4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> |
| 5 | |
| 6 | Index: initscripts-9.43/rc.d/init.d/functions |
| 7 | =================================================================== |
| 8 | --- initscripts-9.43.orig/rc.d/init.d/functions |
| 9 | +++ initscripts-9.43/rc.d/init.d/functions |
| 10 | @@ -13,6 +13,7 @@ umask 022 |
| 11 | PATH="/sbin:/usr/sbin:/bin:/usr/bin" |
| 12 | export PATH |
| 13 | |
| 14 | + |
| 15 | if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \ |
| 16 | ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then |
| 17 | case "$0" in |
| 18 | @@ -54,7 +55,7 @@ systemctl_redirect () { |
| 19 | [ -z "${COLUMNS:-}" ] && COLUMNS=80 |
| 20 | |
| 21 | if [ -z "${CONSOLETYPE:-}" ]; then |
| 22 | - if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then |
| 23 | + if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then |
| 24 | CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)" |
| 25 | else |
| 26 | CONSOLETYPE="serial" |