From 4159e604386b56ccab3e1b2a35eabfe9e0395c80 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 10 Sep 2023 22:23:04 +0800 Subject: [PATCH] =?UTF-8?q?opensuse:=20=E6=94=AF=E6=8C=81=20tumbleweed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 ++++++++------- nocloud.yaml | 3 ++- reinstall.sh | 67 ++++++++++++++++++++++++++++++++-------------------- trans.sh | 6 +++++ 4 files changed, 60 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 2cdafd9..27f7cad 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ - 支持使用官方 iso 重装到 Windows (不支持 ARM) - 支持从 Windows 重装到 Linux - 原系统分区支持 lvm / btrfs +- 自动选择国内外安装源 - 使用 dd 或云镜像时有高贵的进度条,可通过 ssh/vnc/web/串行控制台 查看 - 有很多注释 @@ -21,15 +22,15 @@ curl -O https://ghproxy.com/https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh ### 安装 Linux: - bash reinstall.sh centos-7/8/9 (centos-8/9 为 stream 版本) - alma-8/9 - rocky-8/9 - fedora-37/38 - ubuntu-20.04/22.04 - alpine-3.16/3.17/3.18 - debian-10/11/12 - opensuse-15.4/15.5 (只支持云镜像) - arch (只支持云镜像) + bash reinstall.sh centos 7|8|9 (8|9 为 stream 版本) + alma 8|9 + rocky 8|9 + fedora 37|38 + debian 10|11|12 + ubuntu 20.04|22.04 + alpine 3.16|3.17|3.18 + opensuse 15.4|15.5|tumbleweed (只支持云镜像) + arch (只支持云镜像) 可选参数: --ci 强制使用云镜像 diff --git a/nocloud.yaml b/nocloud.yaml index 50dc9ec..bcbd015 100644 --- a/nocloud.yaml +++ b/nocloud.yaml @@ -17,7 +17,8 @@ chpasswd: type: text runcmd: # arch 没有 /etc/ssh/sshd_config.d/ 文件夹 - - echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config + # opensuse tumbleweed 有 /etc/ssh/sshd_config.d/ 文件夹,但没有 /etc/ssh/sshd_config,但有/usr/etc/ssh/sshd_config + - grep 'Include.*/etc/ssh/sshd_config.d' /etc/sshd_config && echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config - systemctl restart sshd # ubuntu 镜像运行 echo -e '\nDone' ,-e 会被显示出来 - echo >/dev/tty0 diff --git a/reinstall.sh b/reinstall.sh index 8f495e4..3c6ed54 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -8,17 +8,17 @@ this_script=$(realpath $0) usage_and_exit() { cat <