依配置文件为主的读取配置信息

This commit is contained in:
aixiao 2019-06-21 22:06:44 +08:00
parent 66f118f213
commit 866e04e23c
2 changed files with 3 additions and 5 deletions

View File

@ -1,3 +1,3 @@
# inss # inss
一款Android手机切换内网IP的shell script 一款Android手机切换内网IP的shell script
仅仅支持LineageOS 15 支持LineageOS 15、16

View File

@ -15,7 +15,7 @@ function INIT_() {
#填写自己的网卡. #填写自己的网卡.
NIC="rmnet_data0"; NIC="rmnet_data1";
#网卡开启状态. #网卡开启状态.
NIC_STATUS="U"; NIC_STATUS="U";
@ -82,7 +82,6 @@ function parameter_() {
exit 1; exit 1;
fi fi
done done
} }
function ROOT_(){ function ROOT_(){
@ -169,7 +168,7 @@ function MAIN_ {
done done
} }
INIT_ $@
while getopts :xc:h? l; do while getopts :xc:h? l; do
case ${l} in case ${l} in
x) x)
@ -189,7 +188,6 @@ esac
done done
shift $((OPTIND-1)); shift $((OPTIND-1));
test "${debug}" = "x" && set -x; test "${debug}" = "x" && set -x;
INIT_ $@
parameter_ ${@}; parameter_ ${@};
MAIN_; MAIN_;
exit $?; exit $?;