diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index 88b8d39e..107d48fb 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -1,18 +1,11 @@ #!/bin/bash +mkdir -p /usr/libexec /run/sshd 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 - (while :; do seatd-launch sway <> /dev/tty1 >& /dev/null; done) & -else - (while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & -fi +(while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) & @@ -41,6 +34,13 @@ modprobe ib_umad modprobe hfi1 modprobe mlx5_ib echo "done" +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 + (while :; do seatd-launch sway <> /dev/tty1 >& /dev/null; done) & +fi cat > /etc/ssh/sshd_config << EOF Port 22 Port 3389 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 6f25d910..c658fce8 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 @@ -2,6 +2,8 @@ root=1 rootok=1 netroot=genesis clear +mount -t cgroup2 cgroup2 /sys/fs/cgroup +mount -t efivarfs efivarfs /sys/firmware/efi/efivars echo PS1="'"'[genesis running on \H \w]$ '"'" >> ~/.bashrc echo PS1="'"'[genesis running on \H \w]$ '"'" >> ~/.bash_profile mkdir -p /etc/ssh @@ -10,7 +12,7 @@ mkdir -p /var/empty/sshd 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 +tmux new-session -d bash /opt/confluent/bin/rungenesis while :; do sleep 86400 done