ubuntu 18.04,22.04 設置 hinet pppoe 連線的 script file
設置 hinet pppoe 連線的 script file
以下 紅色 Hinet 為連線名稱,使用者名,及密碼,請修正.
兩條虛線間,存成 hinet_pppoe.sh
然後 $ chmod +x hinet_pppoe.sh
$ ./hinet_pppoe.sh
-------
LINK_NAME="Hinet"
echo Build a internet pppoe to ${LINK_NAME}
nmcli connection delete ${LINK_NAME}
echo nmcli con edit type pppoe con-name ${LINK_NAME}
echo -e \
"set pppoe.username 1234567@hinet.net\n"\
"set pppoe.password xxxxxxx\n"\
"print pppoe\n"\
"save\n"\
"yes\n"\
"quit\n" | nmcli con edit type pppoe con-name ${LINK_NAME}
nmcli connection show
以下 紅色 Hinet 為連線名稱,使用者名,及密碼,請修正.
兩條虛線間,存成 hinet_pppoe.sh
然後 $ chmod +x hinet_pppoe.sh
$ ./hinet_pppoe.sh
-------
LINK_NAME="Hinet"
echo Build a internet pppoe to ${LINK_NAME}
nmcli connection delete ${LINK_NAME}
echo nmcli con edit type pppoe con-name ${LINK_NAME}
echo -e \
"set pppoe.username 1234567@hinet.net\n"\
"set pppoe.password xxxxxxx\n"\
"print pppoe\n"\
"save\n"\
"yes\n"\
"quit\n" | nmcli con edit type pppoe con-name ${LINK_NAME}
nmcli connection show
nmcli dev status
echo You can delete by command: $ nmcli connection delete ${LINK_NAME}
---------
echo You can delete by command: $ nmcli connection delete ${LINK_NAME}
---------
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁