From fc150636b9393e31aa7d5a8d8320b111476ba2f1 Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Fri, 3 Apr 2020 18:10:04 +0800 Subject: 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 --- themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material | 1 + 1 file changed, 1 insertion(+) (limited to 'themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material') diff --git a/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material b/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material index 96ab461859..7f07239ec0 100755 --- a/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material +++ b/themes/luci-theme-material/root/etc/uci-defaults/30_luci-theme-material @@ -1,6 +1,7 @@ #!/bin/sh if [ "$PKG_UPGRADE" != 1 ]; then + uci get luci.themes.Material >/dev/null 2>&1 || \ uci batch <<-EOF set luci.themes.Material=/luci-static/material set luci.main.mediaurlbase=/luci-static/material -- cgit v1.2.3