-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use getopts(builtin) to handle options
- Loading branch information
Showing
2 changed files
with
117 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,12 @@ scp CQU_drcom* -r [email protected]:/root/. | |
|
||
5. 如果返回联网失败,可稍后再次检查网络连通情况 | ||
|
||
## 关于运行选项 | ||
```bash | ||
-V 或 --dry-run 用于测试脚本(仅运行,不进行任何设置) | ||
-h 或 --help 显示帮助信息 | ||
``` | ||
|
||
## 關於啓動腳本 | ||
位置: `/etc/init.d/drcomctl` | ||
```sh | ||
|
@@ -44,6 +50,10 @@ scp CQU_drcom* -r [email protected]:/root/. | |
``` | ||
所有有關的控制項目可至`Luci` -> `System - Startup` -> `Initscripts`尋找。 | ||
## CHANGE LOG | ||
2020.09.06-2 | ||
- 使用 `getopts` 来处理选项 | ||
- 修正无选项时运行错误的问题 | ||
|
||
2020.09.06 | ||
- 添加了循环判断,用于当信息填写有误时的修改而不用重新运行脚本 | ||
- 添加了 `--dry-run` 运行选项以方便进行测试 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters