Yuhang Zheng

OpenWRT在编译前选择要使用的主题

N 人看过

在OpenWRT源码中修改

1、默认主题配置文件
feeds/luci/modules/luci-base/root/etc/config/luci

config core main
        option lang auto
        option mediaurlbase /luci-static/bootstrap
        option resourcebase /luci-static/resources
        option ubuspath /ubus/

2、然后是修改每个主题文件下面的30_luci-theme-***文件
比如
/feeds/kenzo/luci-theme-opentomato/root/etc/uci-defaults/30_luci-theme-opentomato
/feeds/luci/themes/luci-theme-bootstrap/root/etc/uci-defaults/30_luci-theme-bootstrap
/package/lean/luci-theme-netgear/root/etc/uci-defaults/30_luci-theme-netgear
注释掉或者删除下面的句子,仅剩一个想要默认的主题不注释

set luci.main.mediaurlbase=/luci-static/opentomato

修改文件系统源码

修改/etc/config/luci文件

config core main
        option lang 'zh_cn'
        option mediaurlbase '/luci-static/bootstrap'
        option resourcebase /luci-static/resources

config extern flash_keep
        option uci                 "/etc/config/"
        option dropbear "/etc/dropbear/"
        option openvirtual**        "/etc/openvirtual**/"
        option passwd        "/etc/passwd"
        option opkg                "/etc/opkg.conf"
        option firewall        "/etc/firewall.user"
        option uploads        "/lib/uci/upload/"

config internal languages

config internal sauth
        option sessionpath "/tmp/luci-sessions"
        option sessiontime 3600

config internal ccache
        option enable 1

config internal themes