📄 route.svn-base
字号:
#!/bin/sh /etc/rc.common# Copyright (C) 2009 OpenRB.comSTART=44STOP=44route_config() { local section=$1 local mode=$2 local action="add" local route_args="" config_get deleted $section deleted [ "$deleted" -eq 1 -o "$mode" = "stop" ] && action="del" config_get target $section target [ -n "$target" ] && route_args="$route_args -net $target" config_get netmask $section netmask [ -n "$netmask" ] && route_args="$route_args netmask $netmask" config_get gateway $section gateway [ -n "$gateway" -a "$gateway" != "*" ] && route_args="$route_args gw $gateway" config_get interface $section interface [ -n "$interface" ] && route_args="$route_args dev $interface" [ -n "$route_args" ] && route $action$route_args [ "$deleted" -eq 1 ] && uci delete "route.$section"}start() { config_load route config_foreach route_config route start uci commit route}stop() { config_load route config_foreach route_config route stop uci commit route}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -