summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-rosy/root
diff options
context:
space:
mode:
authorChen Minqiang <ptpt52@gmail.com>2020-04-03 18:10:04 +0800
committerChen Minqiang <ptpt52@gmail.com>2020-04-03 21:44:28 +0800
commitfc150636b9393e31aa7d5a8d8320b111476ba2f1 (patch)
treebc050e626e0af7497622d1049d52ba51e9e27e8d /themes/luci-theme-rosy/root
parent3c4bc228a1f7b5731cf464f3f407c9ed9ace3cd2 (diff)
luci-theme-*: set mediaurlbase if it is the first time to be installed
If we build multi-themes into firmware, each of them set itself to be the default theme, what theme should it be? To make it clear, we only set mediaurlbase if the theme is the first time to be installed/built-in. This resolve the issue that theme always change to somewhat default after upgrading the firmware even with a config-keep-upgrade Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Diffstat (limited to 'themes/luci-theme-rosy/root')
-rwxr-xr-xthemes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy1
1 files changed, 1 insertions, 0 deletions
diff --git a/themes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy b/themes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy
index ab0299a9c..8c21ddddd 100755
--- a/themes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy
+++ b/themes/luci-theme-rosy/root/etc/uci-defaults/30_luci-theme-rosy
@@ -1,6 +1,7 @@
#!/bin/sh
if [ "$PKG_UPGRADE" != 1 ]; then
+ uci get luci.themes.Rosy >/dev/null 2>&1 || \
uci batch <<-EOF
set luci.themes.Rosy=/luci-static/rosy
set luci.main.mediaurlbase=/luci-static/rosy