From 76c2388b42edde9346004dc596c44402c54e58f8 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 23 Mar 2022 13:49:11 +0100 Subject: [PATCH] config/yadm/bootstrap: do not hardcode agetty --- .config/yadm/bootstrap | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index 9c6149e..4ae7945 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -1,4 +1,3 @@ -# Headings SECTION() { printf "\n$1\n"; } highlight() { printf "$1\n"; } subhighlight() { printf "$1\n"; } @@ -19,10 +18,12 @@ echo "$USER ALL = NOPASSWD: /usr/bin/halt, /usr/bin/shutdown, /usr/bin/reboot, / sudo tee /etc/sudoers.d/shutdown highlight "Set default user in tty1,2,3" -sudo mkdir -p /etc/systemd/system/getty@tty{1,2,3}.service.d -echo "[Service] +agetty="$(sudo which agetty)" && + sudo mkdir -p /etc/systemd/system/getty@tty{1,2,3}.service.d && + echo "[Service] +Restart=Never ExecStart= -ExecStart=-/usr/bin/agetty --skip-login --login-options $USER %I" | +ExecStart=-$agetty --skip-login --login-options $USER %I" | sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf /etc/systemd/system/getty@tty2.service.d/override.conf /etc/systemd/system/getty@tty3.service.d/override.conf highlight "Sysyadm setup"