🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
config school 'config'
option IPID '0'
option IUA '0'
option INTP '0'
option ITTL '0'
option IACFlash '0'
+102
View File
@@ -0,0 +1,102 @@
#!/bin/sh /etc/rc.common
START=90
STOP=10
restart_utils="true"
start_ipid() {
/usr/share/school/ipid.rules
}
start_ua() {
/usr/share/school/iac.rules
}
start_ntp() {
/usr/share/school/intp.rules
}
start_ttl() {
/usr/share/school/ittl.rules
}
start_ac() {
/usr/share/school/iac.rules
}
stop_ipid() {
nft flush table ipid
}
stop_ua() {
nft flush table iua2f
}
stop_ntp() {
nft flush table intp
}
stop_ttl() {
nft flush table ittl
}
stop_ac() {
nft flush table iac
}
init_conf() {
config_load "school"
config_get "IPID" "config" "IPID" "0"
config_get "IUA" "config" "IUA" "0"
config_get "INTP" "config" "INTP" "0"
config_get "ITTL" "config" "ITTL" "0"
config_get "IACFlash" "config" "IACFlash" "0"
}
start() {
init_conf
if [ "${IPID}" -eq "1" ]; then
start_ipid
fi
if [ "${IUA}" -eq "1" ]; then
start_ua
fi
if [ "${INTP}" -eq "1" ]; then
start_ntp
fi
if [ "${ITTL}" -eq "1" ]; then
start_ttl
fi
if [ "${IACFlash}" -eq "1" ]; then
start_ac
fi
}
stop() {
init_conf
if [ "${IPID}" -eq "0" ]; then
stop_ipid
fi
if [ "${IUA}" -eq "0" ]; then
stop_ua
fi
if [ "${INTP}" -eq "0" ]; then
stop_ntp
fi
if [ "${ITTL}" -eq "0" ]; then
stop_ttl
fi
if [ "${IACFlash}" -eq "0" ]; then
stop_ac
fi
}
restart(){
stop
start
}