diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-12 05:28:49 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-12 05:28:49 +0000 |
commit | 5c2000a1572afd0df74339775dfa8b61e287a53e (patch) | |
tree | d6d7648afe87f9c128a497f2590a0399fa9abbb0 /libs/core/root | |
parent | 2472cd5613cf5dfc5760c084c8094bead7ddb507 (diff) |
libs: merge libs/uci into libs/core
Diffstat (limited to 'libs/core/root')
-rw-r--r-- | libs/core/root/etc/config/ucitrack | 48 | ||||
-rwxr-xr-x | libs/core/root/sbin/luci-reload | 40 |
2 files changed, 88 insertions, 0 deletions
diff --git a/libs/core/root/etc/config/ucitrack b/libs/core/root/etc/config/ucitrack new file mode 100644 index 000000000..7b47cc8d5 --- /dev/null +++ b/libs/core/root/etc/config/ucitrack @@ -0,0 +1,48 @@ +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 + list affects luci_statistics + +config luci_splash + option init luci_splash + +config upnpd + option init miniupnpd + +config ntpclient + option init ntpclient + +config samba + option init samba + +config tinyproxy + option init tinyproxy diff --git a/libs/core/root/sbin/luci-reload b/libs/core/root/sbin/luci-reload new file mode 100755 index 000000000..24cf76064 --- /dev/null +++ b/libs/core/root/sbin/luci-reload @@ -0,0 +1,40 @@ +#!/bin/sh +. /etc/functions.sh + +apply_config() { + config_get init "$1" init + config_get exec "$1" exec + config_get test "$1" test + + echo "$2" > "/var/run/luci-reload-status" + + [ -n "$init" ] && reload_init "$2" "$init" "$test" + [ -n "$exec" ] && reload_exec "$2" "$exec" "$test" +} + +reload_exec() { + [ -x $2 ] && { + echo "Reloading $1... " + $2 >/dev/null 2>&1 + [ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!' + } +} + +reload_init() { + [ -x /etc/init.d/$2 ] && /etc/init.d/$2 enabled && { + echo "Reloading $1... " + /etc/init.d/$2 reload >/dev/null 2>&1 + [ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!' + } +} + +lock "/var/run/luci-reload" + +config_load ucitrack + +for i in $*; do + config_foreach apply_config $i $i +done + +rm -f "/var/run/luci-reload-status" +lock -u "/var/run/luci-reload" |