diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index ebf0a380..de9b4305 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -1,5 +1,20 @@ #!/bin/bash +if [ ! -x /usr/libexec/platform-python ]; then + ln -s /usr/bin/python3 /usr/libexec/platform-python +fi export LANG=en_US.utf8 + +if [ -x /usr/bin/seatd-launch -a -x /usr/bin/sway ]; then + export XDG_RUNTIME_DIR=/run/users/0 + mkdir -p $XDG_RUNTIME_DIR + sed -i '/^output /d' /etc/sway/config + echo 'exec foot -t XTERM -T Terminal tmux a' > /etc/sway/config.d/genesis +else + (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & +fi + + + mkdir -p /etc/confluent if ! grep console= /proc/cmdline >& /dev/null; then autocons=$(/opt/confluent/bin/autocons) @@ -9,13 +24,9 @@ if ! grep console= /proc/cmdline >& /dev/null; then if [ ! -z "$autocons" ]; then echo "Using $(cat /tmp/01-autocons.conf)" (while :; do TERM=xterm-256color tmux a <> $autocons >&0 2>&1; done) & - (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & - else - (while :; do TERM=linux tmux a <> /dev/console >&0 2>&1; done) & fi else (while :; do TERM=xterm-256color tmux a <> /dev/console >&0 2>&1; done) & - (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & fi (while :; do TERM=linux tmux <> /dev/tty2 >&0 2>&1; done) & echo -n "udevd: " diff --git a/confluent_osdeploy/genesis/initramfs/usr/lib/dracut/hooks/cmdline/10-genesis.sh b/confluent_osdeploy/genesis/initramfs/usr/lib/dracut/hooks/cmdline/10-genesis.sh index b5cfd961..6f25d910 100644 --- a/confluent_osdeploy/genesis/initramfs/usr/lib/dracut/hooks/cmdline/10-genesis.sh +++ b/confluent_osdeploy/genesis/initramfs/usr/lib/dracut/hooks/cmdline/10-genesis.sh @@ -7,7 +7,7 @@ echo PS1="'"'[genesis running on \H \w]$ '"'" >> ~/.bash_profile mkdir -p /etc/ssh mkdir -p /var/tmp/ mkdir -p /var/empty/sshd -sed -i '/^root:x/d' /etc/passwd +sed -i '/^root:/d' /etc/passwd echo root:x:0:0::/:/bin/bash >> /etc/passwd echo sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin >> /etc/passwd tmux new-session -d sh /opt/confluent/bin/rungenesis