From 797e197bc7578bb4902813262e98c8dd28dcb4ea Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 13 Mar 2021 12:47:48 -0500 Subject: [PATCH] Have tmux keep reattaching If someone accidentally detaches, then intervene and reattach. --- .../genesis/initramfs/opt/confluent/bin/rungenesis | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index 28dfdb79..7af33603 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -8,14 +8,14 @@ if ! grep console= /proc/cmdline >& /dev/null; then echo $autocons > /tmp/01-autocons.devnode if [ ! -z "$autocons" ]; then echo "Using $(cat /tmp/01-autocons.conf)" - tmux a <> $autocons >&0 2>&1 & - TERM=linux tmux a <> /dev/tty1 >&0 2>&1 & + (while :; do tmux a <> $autocons >&0 2>&1; done) & + (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & else - tmux a <> /dev/console >&0 2>&1 & + (while :; do tmux a <> /dev/console >&0 2>&1; done) & fi else - tmux a <> /dev/console >&0 2>&1 & - TERM=linux tmux a <> /dev/tty1 >&0 2>&1 & + (while :; do tmux a <> /dev/console >&0 2>&1; done) & + (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & fi echo -n "udevd: " /usr/lib/systemd/systemd-udevd --daemon