mirror of
https://github.com/bin456789/reinstall.git
synced 2026-02-04 09:04:18 +08:00
core: 优化代码
This commit is contained in:
@ -18,7 +18,7 @@ chpasswd:
|
||||
runcmd:
|
||||
# opensuse tumbleweed 有 /etc/ssh/sshd_config.d/ 文件夹,没有 /etc/ssh/sshd_config,有/usr/etc/ssh/sshd_config
|
||||
- grep 'Include.*/etc/ssh/sshd_config.d' /etc/ssh/sshd_config && mkdir -p /etc/ssh/sshd_config.d && echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
|
||||
- systemctl restart sshd
|
||||
- systemctl restart sshd || systemctl restart ssh
|
||||
- touch /etc/cloud/cloud-init.disabled
|
||||
# ubuntu 镜像运行 echo -e '\nDone' ,-e 会被显示出来
|
||||
- printf '\n%s\n' 'reinstall done' >/dev/tty0 || true
|
||||
|
||||
Reference in New Issue
Block a user