summaryrefslogtreecommitdiffstats
path: root/share/hooks/pre-start.unlink-console.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-11-04 06:06:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-11-04 06:07:41 +0000
commit213313c109c5551473da36a85ceb56bdf1162628 (patch)
tree36b6bef13e2080d6af1c5a6fa4ed4ceb118ff742 /share/hooks/pre-start.unlink-console.sh
parentReleasing debian version 20190811-1. (diff)
downloadopen-infrastructure-compute-tools-213313c109c5551473da36a85ceb56bdf1162628.tar.xz
open-infrastructure-compute-tools-213313c109c5551473da36a85ceb56bdf1162628.zip
Merging upstream version 20191104.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/hooks/pre-start.unlink-console.sh')
-rw-r--r--share/hooks/pre-start.unlink-console.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/hooks/pre-start.unlink-console.sh b/share/hooks/pre-start.unlink-console.sh
new file mode 100644
index 0000000..762ab0e
--- /dev/null
+++ b/share/hooks/pre-start.unlink-console.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if grep -qs 'bind=.*/dev:/dev;' "/etc/open-infrastructure/container/config/${NAME}.conf"
+then
+ unlink /dev/console > /dev/null 2>&1 || true
+fi