From d82ba494a74da995740d8b93d9d7911ac9b8722c Mon Sep 17 00:00:00 2001 From: daxi20 Date: Mon, 13 Oct 2025 01:18:32 +0800 Subject: [PATCH] 00 --- update.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/update.sh b/update.sh index 973c36b..18c1d56 100644 --- a/update.sh +++ b/update.sh @@ -1,5 +1,16 @@ #!/bin/bash +TABLE_NAME="ipv4_pub" +TABLE_ID=102 +RT_TABLES="/etc/iproute2/rt_tables" + +if ! grep -q "^${TABLE_ID}[[:space:]]\+${TABLE_NAME}" "$RT_TABLES"; then + echo "添加路由表 $TABLE_NAME(编号$TABLE_ID)..." + echo "${TABLE_ID} ${TABLE_NAME}" >> "$RT_TABLES" +else + echo "路由表 $TABLE_NAME 已存在,无需创建" +fi + git clone git@ssh.git.nia.ink:brnet/bird_config.git rm /etc/bird/bird.conf rm /etc/bird/function/tables.conf