Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

路由器时间同步问题 #53

Closed
gancaocao opened this issue Nov 2, 2015 · 8 comments
Closed

路由器时间同步问题 #53

gancaocao opened this issue Nov 2, 2015 · 8 comments

Comments

@gancaocao
Copy link

我的路由器没有硬件时钟,无法保存时间,但是netkeeper认证需要时间是正确的 ,请问,怎么才能让时间自动同步呢

@cuyl
Copy link
Contributor

cuyl commented Nov 2, 2015

那就只能用工具设置路由了

@miao1007
Copy link
Owner

miao1007 commented Nov 2, 2015

自己找学校的ntp即可

还有不要发那种用E语言写的闭源垃圾软件广告

@cuyl
Copy link
Contributor

cuyl commented Nov 2, 2015

只是为了解决问题,没必要带那么大偏见

@cuyl
Copy link
Contributor

cuyl commented Nov 2, 2015

你看看这些开源代码,还不是被人一声不吭拿去赚钱,不要盲目迷信开源好不好

@0x5e
Copy link

0x5e commented Nov 2, 2015

不需要时间正确的,时间戳用1970年的用着也没啥问题..只是用作随机数

@gancaocao
Copy link
Author

有的路由器可以时间不同步,我试过另一个时间不对也能连上,但是我这个就提示这个:
Remote message: Pin code error,please check your time##Pin code error,please check your time

@cuyl
Copy link
Contributor

cuyl commented Nov 28, 2015

这是我写的湖北同步时间的办法,uci部分暂时还没测试其他省应该都有对应的网址吧?
timesyn.sh

#!/bin/sh
uci set network.timesyn='interface'
uci set network.timesyn.proto='pppoe'
uci set network.timesyn.ifname='eth0.2'
uci set network.timesyn.username='wuhan'
uci set network.timesyn.password='wuhan'
uci set network.timesyn.metric='0'
uci commit timesyn
ifup timesyn
uci set firewall.@zone[1].network='wan wan6 netkeeper timesyn' 
uci commit firewall
/etc/init.d/firewall restart
date -u "`curl -sI kd.wuhan.net.cn | awk '/Date:/{gsub(/Jan/,"01",$4);gsub(/Feb/,"02",$4);gsub(/Mar/,"03",$4);gsub(/Apr/,"04",$4);gsub(/May/,"05",$4);gsub(/Jun/,"06",$4);gsub(/Jul/,"07",$4);gsub(/Aug/,"08",$4);gsub(/Sep/,"09",$4);gsub(/Oct/,"10",$4);gsub(/Nov/,"11",$4);gsub(/Dec/,"11",$4);print $5"-"$4"-"$3" "$6;}'`"

@a1379478560
Copy link

@cuyl 这位哥们帮我大忙了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants