2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-08-17 00:30:24 +00:00

If doing GUI in Genesis, defer until after udevd

udev is needed to run in some scenarios for seatd/sway to
function correctly.
This commit is contained in:
Jarrod Johnson
2025-04-08 09:25:19 -04:00
parent 799fff10ff
commit 71ddbb88fc
2 changed files with 12 additions and 10 deletions

View File

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

View File

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