增加初始化脚本

This commit is contained in:
2025-07-11 17:41:36 +08:00
parent ec48fad615
commit a314a1a0d8
3 changed files with 612 additions and 7 deletions

View File

@@ -2,7 +2,10 @@
```bash
# 在 systemd-networkd-wait-online.service Service 加入 TimeoutStartSec=2sec
sudo vim /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
sudo EDITOR=vim systemctl edit systemd-networkd-wait-online.service
# 在打开的编辑器中添加:
# [Service]
# TimeoutStartSec=2sec
```
### 初始化设备
@@ -48,10 +51,14 @@ fi
### 自动登录
编辑 `/etc/systemd/system/getty.target.wants/getty@tty1.service` 文件,将 `ExecStart` 行修改为
使用 systemctl edit 修改 getty@tty1 服务
```bash
ExecStart=-/sbin/agetty --autologin <your_username> --noclear %I $TERM
sudo EDITOR=vim systemctl edit getty@tty1.service
# 在打开的编辑器中添加:
# [Service]
# ExecStart=
# ExecStart=-/sbin/agetty --autologin <your_username> --noclear %I $TERM
```
其中: