route.svn-base
来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 44 行
SVN-BASE
44 行
#!/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 + =
减小字号Ctrl + -
显示快捷键?