From fcc5c2b019e8203a0c0ed5eb5ae0e2ee39c5602e Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Fri, 14 Aug 2026 01:20:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20PVE=20Ceph=20=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E6=BA=90=E9=85=8D=E7=BD=AE=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02.PVE初始化配置.md | 16 +++++++++------- src/debian/debian_dns_smartdns_cron.conf | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/02.PVE初始化配置.md b/02.PVE初始化配置.md index 0ec9aae..d47741b 100644 --- a/02.PVE初始化配置.md +++ b/02.PVE初始化配置.md @@ -75,21 +75,23 @@ EOF ```bash ## 配置 PVE Ceph 免订阅软件源脚本 $ if [ -f /etc/apt/sources.list.d/ceph.sources ]; then - . /etc/os-release - CEPH_CODENAME=$(ceph -v | awk '/^ceph version / { print $(NF - 1); exit }') + ( + . /etc/os-release + CEPH_CODENAME=$(ceph -v | awk '/^ceph version / { print $(NF - 1); exit }') - if [ -z "$CEPH_CODENAME" ] || [ -z "${VERSION_CODENAME:-}" ]; then - echo "无法确定 Ceph 或 Debian 版本代号。" >&2 - exit 1 - fi + if [ -z "$CEPH_CODENAME" ] || [ -z "${VERSION_CODENAME:-}" ]; then + echo "Unable to determine Ceph or Debian codename." >&2 + exit 1 + fi - tee /etc/apt/sources.list.d/pve-ceph-no-subscription.sources >/dev/null </dev/null <