mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fixdevelop
This commit is contained in:
parent
aeacaf914c
commit
753de38595
797 changed files with 70531 additions and 22374 deletions
|
@ -6,7 +6,7 @@ if [ -f /usr/sbin/iptables-legacy ]; then
|
|||
IPTABLESRESTORE="/usr/sbin/iptables-legacy-restore"
|
||||
else
|
||||
IPTABLESSAVE="/usr/sbin/iptables-save"
|
||||
IPTABLESRESTORE="/usr/sbin/iptables-restore"
|
||||
IPTABLESRESTORE="/usr/sbin/iptables-restore --noflush"
|
||||
fi
|
||||
|
||||
_setup_rules() {
|
||||
|
@ -39,7 +39,7 @@ _setup_fw() {
|
|||
[ -n "$ifnames" ] && rule="$rule -i $(echo "${ifnames}" | sed 's/ /-i /g')"
|
||||
if [ -n "$rule" ] && [ -n "$lookup" ]; then
|
||||
$IPTABLESAVE --counters | grep -v "0x${lookup}" | $IPTABLERESTORE -w --counters
|
||||
$IPTABLERESTORE --noflush <<-EOF
|
||||
$IPTABLERESTORE <<-EOF
|
||||
*mangle
|
||||
-A omr-gre-tunnel ${rule} -j MARK --set-mark 0x${lookup}
|
||||
COMMIT
|
||||
|
@ -48,7 +48,7 @@ _setup_fw() {
|
|||
}
|
||||
|
||||
if [ -z "$($IPTABLESAVE | grep omr-gre-tunnel)" ]; then
|
||||
$IPTABLERESTORE --noflush <<-EOF
|
||||
$IPTABLERESTORE <<-EOF
|
||||
*mangle
|
||||
:omr-gre-tunnel -
|
||||
-I PREROUTING 1 -m addrtype ! --dst-type LOCAL -j omr-gre-tunnel
|
||||
|
|
17
openmptcprouter/files/etc/init.d/fengshan
Executable file
17
openmptcprouter/files/etc/init.d/fengshan
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
start()
|
||||
{
|
||||
tem=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
echo $tem
|
||||
if [ $tem -ge 60000 ] ; then
|
||||
echo 1 > /sys/class/leds/green:fengshan/brightness;
|
||||
echo "fengshandoup"
|
||||
logger -t "fengshanup"
|
||||
elif [ $tem -le 50000 ] ; then
|
||||
echo 0 > /sys/class/leds/green:fengshan/brightness;
|
||||
echo "fengshandown"
|
||||
logger -t "$tem" "fengshandown"
|
||||
fi
|
||||
}
|
|
@ -7,18 +7,6 @@ if [ "$(grep usbmode /etc/rc.local)" = "" ]; then
|
|||
/sbin/usbmode -l 2>&1 /dev/null
|
||||
/bin/sleep 3
|
||||
/sbin/usbmode -s 2>&1 /dev/null
|
||||
/bin/sleep 10
|
||||
echo 0 >/sys/class/leds/green:5g1pwr/brightness
|
||||
/bin/sleep 2
|
||||
echo 0 >/sys/class/leds/green:5g2pwr/brightness
|
||||
/bin/sleep 2
|
||||
echo 0 >/sys/class/leds/green:5g3pwr/brightness
|
||||
/bin/sleep 10
|
||||
echo 1 >/sys/class/leds/green:5g1pwr/brightness
|
||||
/bin/sleep 3
|
||||
echo 1 >/sys/class/leds/green:5g2pwr/brightness
|
||||
/bin/sleep 3
|
||||
echo 1 >/sys/class/leds/green:5g3pwr/brightnes
|
||||
exit 0
|
||||
EOF
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue