From 506451071d842289ea580e7d74d6d0974dde32be Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 22 Aug 2025 10:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Tips=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E5=92=8C=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issues.yml | 26 +++++++++++++++++--------- docs/issues.html | 12 +++++++++++- files/initrd/opt/rr/boot.sh | 1 + files/initrd/opt/rr/include/consts.sh | 1 + files/initrd/opt/rr/init.sh | 1 + 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 79e6c3fb..131ede63 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -43,6 +43,7 @@ jobs: language= '' sn = '' macs = '' + tips = '' model = '' version = '' kernel = '' @@ -58,6 +59,7 @@ jobs: language = jsonbody.get('language', '') sn = jsonbody.get('sn', '') macs = jsonbody.get('macs', '') + tips = jsonbody.get('tips', '') model = jsonbody.get('model', '') version = jsonbody.get('version', '') kernel = jsonbody.get('kernel', '') @@ -79,6 +81,7 @@ jobs: set_output("language", language) set_output("sn", sn) set_output("macs", macs) + set_output("tips", tips) set_output("model", model) set_output("version", version) set_output("kernel", kernel) @@ -248,7 +251,7 @@ jobs: USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml" writeConfigKey "sn" "${{ env.sn }}" "${USER_CONFIG_FILE}" fi - + if [ -n "${{ env.macs }}" ]; then echo "set macs: ${{ env.macs }}" USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml" @@ -257,6 +260,11 @@ jobs: writeConfigKey "mac2" "${MACS[1]}" "${USER_CONFIG_FILE}" fi + if [ -n "${{ env.tips }}" ]; then + echo "set tips: ${{ env.tips }}" + echo -e "${{ env.tips }}" | sudo tee rr/ws/mnt/p3/AddTips + fi + if [ -n "${{ env.addons }}" ]; then echo "set addons: ${{ env.addons }}" USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml" @@ -415,14 +423,6 @@ jobs: ---- emoji: hooray - - name: Close Issues - if: env.iscustom == 'true' && success() - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - - name: Update Comment Fail if: env.iscustom == 'true' && failure() uses: actions-cool/issues-helper@v3 @@ -437,3 +437,11 @@ jobs: > ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ---- emoji: confused + + - name: Close Issues + if: env.iscustom == 'true' + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issue' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} diff --git a/docs/issues.html b/docs/issues.html index d8fb4ab1..06f66147 100644 --- a/docs/issues.html +++ b/docs/issues.html @@ -107,9 +107,11 @@ if (debug) { $('#sn_item').show(); $('#macs_item').show(); + $('#tips_item').show(); } else { $('#sn_item').hide(); $('#macs_item').hide(); + $('#tips_item').hide(); } setModels(); }); @@ -279,7 +281,7 @@ var body = {}; var _parameters = ["title", "format", "size", "template", "language", "model", "version", "kernel", "addons", "modules"]; if (debug) { - _parameters.push("sn", "macs"); + _parameters.push("sn", "macs", "tips"); } for (var key in _parameters) { var name = _parameters[key]; @@ -432,6 +434,14 @@ +
+
+ +
+
+ +
+
diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index 6a61de7c..ef36d9b6 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -433,6 +433,7 @@ else _bootwait || exit 0 + [ -n "$(cat "${ADD_TIPS_FILE}" 2>/dev/null)" ] && printf "$(TEXT "%s\n")" "$(cat "${ADD_TIPS_FILE}" 2>/dev/null)" printf "\033[1;37m%s\033[0m\n" "$(TEXT "Loading DSM kernel ...")" DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")" diff --git a/files/initrd/opt/rr/include/consts.sh b/files/initrd/opt/rr/include/consts.sh index e99fee63..229bc69b 100755 --- a/files/initrd/opt/rr/include/consts.sh +++ b/files/initrd/opt/rr/include/consts.sh @@ -38,6 +38,7 @@ RR_RAMUSER_FILE="${PART3_PATH}/initrd-rru" MC_RAMDISK_FILE="${PART3_PATH}/microcode.img" MOD_ZIMAGE_FILE="${PART3_PATH}/zImage-dsm" MOD_RDGZ_FILE="${PART3_PATH}/initrd-dsm" +ADD_TIPS_FILE="${PART3_PATH}/AddTips" CKS_PATH="${PART3_PATH}/cks" LKMS_PATH="${PART3_PATH}/lkms" diff --git a/files/initrd/opt/rr/init.sh b/files/initrd/opt/rr/init.sh index 7b956cc5..5682b6f7 100755 --- a/files/initrd/opt/rr/init.sh +++ b/files/initrd/opt/rr/init.sh @@ -239,6 +239,7 @@ printf "\n" printf "$(TEXT "Call \033[1;32minit.sh\033[0m to re get init info\n")" printf "$(TEXT "Call \033[1;32mmenu.sh\033[0m to configure loader\n")" printf "\n" +[ -n "$(cat "${ADD_TIPS_FILE}" 2>/dev/null)" ] && printf "$(TEXT "%s\n")" "$(cat "${ADD_TIPS_FILE}" 2>/dev/null)" printf "$(TEXT "User config is on \033[1;32m%s\033[0m\n")" "${USER_CONFIG_FILE}" printf "$(TEXT "HTTP: \033[1;34mhttp://%s:%d\033[0m\n")" "rr" "${HTTP:-7080}" printf "$(TEXT "DUFS: \033[1;34mhttp://%s:%d\033[0m\n")" "rr" "${DUFS:-7304}"