themes: Add registration of themes at package installation time
authorSteven Barth <steven@midlink.org>
Wed, 23 Jul 2008 11:32:53 +0000 (11:32 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 23 Jul 2008 11:32:53 +0000 (11:32 +0000)
libs/web/root/etc/config/luci
themes/openwrt.org/ipkg/postinst [new file with mode: 0755]
themes/openwrt.org/root/etc/uci-defaults/luci-theme-openwrt [new file with mode: 0755]

index 43c484a8fd793bde47f32ef6f14c0fe4a0a9d053..b02fb51f50ac3a178deb9d2c1d09e8b2d0e83a28 100644 (file)
@@ -44,4 +44,3 @@ config internal template
        option compiledir "/tmp/.lucitplcache"
                
 config internal themes
-       option OpenWRT "/luci-static/openwrt.org"
diff --git a/themes/openwrt.org/ipkg/postinst b/themes/openwrt.org/ipkg/postinst
new file mode 100755 (executable)
index 0000000..48ea522
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-theme-openwrt ) &&   rm -f /etc/uci-defaults/luci-theme-openwrt
+}
diff --git a/themes/openwrt.org/root/etc/uci-defaults/luci-theme-openwrt b/themes/openwrt.org/root/etc/uci-defaults/luci-theme-openwrt
new file mode 100755 (executable)
index 0000000..a8bef6c
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+uci batch <<-EOF
+       set luci.themes.OpenWRT=/luci-static/openwrt.org
+        commit luci
+EOF
+