config/yadm/bootstrap: do not hardcode agetty
This commit is contained in:
parent
ae0405554e
commit
76c2388b42
|
@ -1,4 +1,3 @@
|
|||
# Headings
|
||||
SECTION() { printf "\n[1m[4m$1[0m\n"; }
|
||||
highlight() { printf "[1m[3m$1[0m\n"; }
|
||||
subhighlight() { printf "[3m$1[0m\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"
|
||||
|
|
Loading…
Reference in New Issue