~ >: vim apps/tools/wifi_uplink
#!/bin/sh
# Copyright (C) 2012 GuoWenxue <guowenxue@gmail.com QQ:281143292>
# This Shell scripts used to NAT by iptables, to make wlan0 as the downlink device
# and set the uplink device as eth0/ppp0, it will be called by crond
#使能profile和ifcfg-wlan0文件
source /etc/profile
source $network_cfg_dir/ifcfg-$DOWNLINK_DEV
#在ifcfg-wlan0文件中有设置是否使用AP模式,如果没有就会在这里退出。
if [ $WORKMODE != AP ] ; then
echo "$DOWNLINK_DEV doesn't work as AP mode, exit now..."
exit
fi
#!/bin/sh
# Copyright (C) 2012 GuoWenxue <guowenxue@gmail.com QQ:281143292>
# This Shell scripts used to NAT by iptables, to make wlan0 as the downlink device
# and set the uplink device as eth0/ppp0, it will be called by crond
DOWNLINK_DEV="wlan0"
#可以改为ppp0
DEF_UPLINK_DEV="eth0"#使能profile和ifcfg-wlan0文件
source /etc/profile
source $network_cfg_dir/ifcfg-$DOWNLINK_DEV
#在ifcfg-wlan0文件中有设置是否使用AP模式,如果没有就会在这里退出。
if [ $WORKMODE != AP ] ; then
echo "$DOWNLINK_DEV doesn't work as AP mode, exit now..."
exit
fi