2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00

Have tmux keep reattaching

If someone accidentally detaches, then intervene and
reattach.
This commit is contained in:
Jarrod Johnson 2021-03-13 12:47:48 -05:00
parent 19d4a3a83f
commit 797e197bc7

View File

@ -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