查看: 5705|回复: 2

【SOM9331】修改默认主题,主持中文,修改时区,修改主机名

[复制链接]
  • TA的每日心情
    奋斗
    2017-7-17 13:49
  • 签到天数: 367 天

    连续签到: 1 天

    [LV.9]以坛为家II

    发表于 2015-11-16 10:05:46 | 显示全部楼层 |阅读模式
    分享到:
    修改默认主题
    修改feeds/luci/libs/web/root/etc/config
      
    1
      
      
    option mediaurlbase  /luci-static/openwrt.org
      
    可根据需要将openwrt.org修改为Bootstap、openwrtcn、freifunk-bno、freifunk-generic

    添加主题
    1.首先打开trunk/feeds/luci/themes这个目录,你会发现里面有很多主题(除了base为基础包外)每一个文件夹就
    是一个主题
    2.我们得修改makefile文件,使其制定编译的时候能找到openwrtcn这个主题
    找到路径为trunk/feeds/luci/contrib/package/luci下面的makefile文件双击打开
    搜索OpenWrt.org这样很快就定位到添加主题的地方了,在下面空白处增加一句
    效果如下
      
    1
      
    2
      
    3
      
    4
      
    5
      
    6
      
    7
      
    8
      
    9
      
    10
      
      
    $(eval $(call  theme,base,Common base for all themes))
      
    $(eval $(call  theme,openwrt,OpenWrt.org ))
      
    $(eval $(call  theme,bootstrap,Bootstrap Theme))
      
    $(eval $(call  theme,openwrtcn,openwrtcn Theme (default),,,1))
      
    $(eval $(call  theme,freifunk-bno,Freifunk Berlin Nordost Theme,\
      
    Stefan Pirwitz  <stefan-at-freifunk-bno-dot-de>))
      
    $(eval $(call  theme,freifunk-generic,Freifunk Generic Theme,\
      
    Manuel Munz  <freifunk-at-somakoma-dot-de>))
      
    保存退出即可。

    默认中文,添加并默认主题
    修改feeds/luci/libs/web/root/etc/config
      
    1
      
      
    option lang auto
      
    改为
      
    1
      
      
    option lang zh_cn
      
    并添加
      
    1
      
    2
      
    3
      
      
    config internal languages
      
    option en 'English'
      
    option zh_cn 'chinese'
      

    修改主机名,设定时区
    修改package/base-files/files/etc/config/system
      
    1
      
    2
      
    3
      
    4
      
    5
      
    6
      
    7
      
    8
      
    9
      
    10
      
    11
      
    12
      
      
    config system
      
    option conloglevel 8
      
    option cronloglevel 8
      
    option hostname Openwrt
      
    option timezone  Asia/Shanghai
      
    option timezone CST-8
      
    config timeserver ntp
      
    list  server 0.openwrt.pool.ntp.org
      
    list  server 1.openwrt.pool.ntp.org
      
    list  server 2.openwrt.pool.ntp.org
      
    list  server 3.openwrt.pool.ntp.org
      
    option enable_server 0
      
    option hostname Openwrt 设定主机名
    option timezone Asia/Shanghai 时区设置为亚洲/上海
    option timezone CST-8 正8区
    list server 就是ntp服务器了。

    回复

    使用道具 举报

  • TA的每日心情
    无聊
    2017-3-23 12:01
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    发表于 2015-11-16 10:07:17 | 显示全部楼层
    感谢楼主发帖  這么好的教程
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2017-3-26 16:00
  • 签到天数: 141 天

    连续签到: 1 天

    [LV.7]常住居民III

    发表于 2015-11-16 10:11:36 | 显示全部楼层
    多谢分享
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    手机版|小黑屋|与非网

    GMT+8, 2024-3-28 23:16 , Processed in 0.139989 second(s), 19 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.