Blame 0036-shutdown-redirect-output-to-dev-console-only-if-it-e.patch

Harald Hoyer 2e4662
From 3be5d63c2fe24252fff92ea9c0ad43d4c7e579bd Mon Sep 17 00:00:00 2001
Harald Hoyer 2e4662
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 2e4662
Date: Fri, 19 Apr 2013 15:00:20 +0200
Harald Hoyer 2e4662
Subject: [PATCH] shutdown: redirect output to /dev/console only if it exists
Harald Hoyer 2e4662
Harald Hoyer 2e4662
---
Harald Hoyer 2e4662
 modules.d/99shutdown/shutdown.sh | 2 +-
Harald Hoyer 2e4662
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer 2e4662
Harald Hoyer 2e4662
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
Harald Hoyer 2e4662
index 6457cb0..f7b8509 100755
Harald Hoyer 2e4662
--- a/modules.d/99shutdown/shutdown.sh
Harald Hoyer 2e4662
+++ b/modules.d/99shutdown/shutdown.sh
Harald Hoyer 2e4662
@@ -8,7 +8,7 @@
Harald Hoyer 2e4662
 # Harald Hoyer <harald@redhat.com>
Harald Hoyer 2e4662
 ACTION="$1"
Harald Hoyer 2e4662
 
Harald Hoyer 2e4662
-exec </dev/console >>/dev/console 2>>/dev/console
Harald Hoyer 2e4662
+[ test -w /dev/console ] && exec </dev/console >>/dev/console 2>>/dev/console
Harald Hoyer 2e4662
 
Harald Hoyer 2e4662
 export TERM=linux
Harald Hoyer 2e4662
 export PATH=/usr/sbin:/usr/bin:/sbin:/bin