wifi_uplink脚本分析

~ >: 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


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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fulinux

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值