* luci/contrib/olsr: add postinstall hooks to register ucitrack action for olsrd...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 13 Sep 2008 18:36:46 +0000 (18:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 13 Sep 2008 18:36:46 +0000 (18:36 +0000)
applications/luci-olsr/ipkg/postinst [new file with mode: 0755]
applications/luci-olsr/root/etc/uci-defaults/luci-olsr [new file with mode: 0644]

diff --git a/applications/luci-olsr/ipkg/postinst b/applications/luci-olsr/ipkg/postinst
new file mode 100755 (executable)
index 0000000..d2a7774
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-olsr ) && rm -f /etc/uci-defaults/luci-olsr
+}
diff --git a/applications/luci-olsr/root/etc/uci-defaults/luci-olsr b/applications/luci-olsr/root/etc/uci-defaults/luci-olsr
new file mode 100644 (file)
index 0000000..2c38098
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+uci batch <<-EOF
+       add ucitrack olsrd
+       set ucitrack.@olsrd[-1].init=olsrd
+       commit ucitrack
+EOF