From 2bf012a40a7a6d0d35b5d61269fd1bafcdf527d6 Mon Sep 17 00:00:00 2001
From: Steven Barth
Date: Mon, 9 Jun 2008 08:48:10 +0000
Subject: [PATCH] * themes/fledermaus: Register on install *
applications/luci-statistics: Fixed wrong paths in templates
---
.../luci-statistics/luasrc/view/admin_statistics/networkplugins.htm | 2 +-
.../luci-statistics/luasrc/view/admin_statistics/outputplugins.htm | 2 +-
.../luci-statistics/luasrc/view/admin_statistics/systemplugins.htm | 2 +-
libs/web/root/etc/config/luci | 1 -
themes/fledermaus/ipkg/postinst | 4 ++++
themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus | 6 ++++++
6 files changed, 13 insertions(+), 4 deletions(-)
create mode 100755 themes/fledermaus/ipkg/postinst
create mode 100755 themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
index e88ca7f58..c211a3951 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
@@ -9,7 +9,7 @@ about open tcp connections, interface traffic, iptables rules etc.%>
<% for plugin, desc in pairs(plugins) do %>
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
- - <%=desc%>
+ - <%=desc%>
<% end %>
<% end %>
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
index c7945f16e..c2f36f2b8 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
@@ -10,7 +10,7 @@ and to transmit the data over the network to other collectd instances.%>
<% for plugin, desc in pairs(plugins) do %>
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
- - <%=desc%>
+ - <%=desc%>
<% end %>
<% end %>
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
index 8c1f714e6..dcedea6b8 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
@@ -6,7 +6,7 @@
<% for plugin, desc in pairs(plugins) do %>
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
- - <%=desc%>
+ - <%=desc%>
<% end %>
<% end %>
diff --git a/libs/web/root/etc/config/luci b/libs/web/root/etc/config/luci
index 0b05d8439..3e1e7db4f 100644
--- a/libs/web/root/etc/config/luci
+++ b/libs/web/root/etc/config/luci
@@ -41,4 +41,3 @@ config internal template
config internal themes
option OpenWRT "/luci-static/openwrt.org"
- option Fledermaus "/luci-static/fledermaus"
diff --git a/themes/fledermaus/ipkg/postinst b/themes/fledermaus/ipkg/postinst
new file mode 100755
index 000000000..1951df576
--- /dev/null
+++ b/themes/fledermaus/ipkg/postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+ ( . /etc/uci-defaults/luci-theme-fledermaus ) && rm -f /etc/uci-defaults/luci-theme-fledermaus
+}
diff --git a/themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus b/themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus
new file mode 100755
index 000000000..83e472b63
--- /dev/null
+++ b/themes/fledermaus/root/etc/uci-defaults/luci-theme-fledermaus
@@ -0,0 +1,6 @@
+#!/bin/sh
+uci batch <<-EOF
+ set luci.themes.Fledermaus=/luci-static/fledermaus
+ commit luci
+EOF
+
--
2.11.0