From bfbc0f354c837eb36e7f75b7f628a29536d66cfc Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Tue, 17 Nov 2020 22:48:40 -0500 Subject: [PATCH] Only default to logging out to tty if tty exists as a character device --- salt/common/tools/sbin/so-image-common | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index 165c20528..3449158c0 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -105,7 +105,11 @@ update_docker_containers() { fi if [ -z "$LOG_FILE" ]; then - LOG_FILE=/dev/tty + if [ -c /dev/tty ]; then + LOG_FILE=/dev/tty + else + LOG_FILE=/dev/null + fi fi # Recheck the version for scenarios were the VERSION wasn't known before this script was imported