summaryrefslogtreecommitdiffhomepage
path: root/libs/uci/root
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-06 13:51:51 +0000
committerSteven Barth <steven@midlink.org>2008-09-06 13:51:51 +0000
commitdbde0216c29148520226a96a57be20ceb2406f45 (patch)
treeb2db4607952c7361f3f4e093e93b126210da0a76 /libs/uci/root
parent8e00d27ae72245aa26feebfcf5cc0338ba1167d0 (diff)
Rewrote UCI apply logic
Diffstat (limited to 'libs/uci/root')
-rw-r--r--libs/uci/root/etc/config/ucitrack47
-rw-r--r--libs/uci/root/sbin/luci-reload31
2 files changed, 78 insertions, 0 deletions
diff --git a/libs/uci/root/etc/config/ucitrack b/libs/uci/root/etc/config/ucitrack
new file mode 100644
index 000000000..cba783d8b
--- /dev/null
+++ b/libs/uci/root/etc/config/ucitrack
@@ -0,0 +1,47 @@
+config network
+ option init network
+ list affects dhcp
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+
+config luci_ethers
+ option init luci_ethers
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba \ No newline at end of file
diff --git a/libs/uci/root/sbin/luci-reload b/libs/uci/root/sbin/luci-reload
new file mode 100644
index 000000000..a92c6eb7f
--- /dev/null
+++ b/libs/uci/root/sbin/luci-reload
@@ -0,0 +1,31 @@
+#!/bin/sh
+. /etc/functions.sh
+
+apply_config() {
+ config_get init "$1" init
+ config_get exec "$1" exec
+
+ [ -n "$init" ] && reload_init "$2" "$init"
+ [ -n "$exec" ] && reload_exec "$2" "$exec"
+}
+
+reload_exec() {
+ [ -x $2 ] && {
+ echo -n "Reloading $1... "
+ $2 >/dev/null 2>&1 && echo "done." || echo "failed!"
+ }
+}
+
+reload_init() {
+ [ -x /etc/init.d/$2 ] && /etc/init.d/$2 enabled && {
+ echo -n "Reloading $1... "
+ /etc/init.d/$2 reload >/dev/null 2>&1 && echo "done." || echo "failed!"
+ }
+}
+
+config_load ucitrack
+
+for i in $*
+do
+ config_foreach apply_config $i
+done \ No newline at end of file