diff options
author | Gustavo Zacarias <gustavo@zacarias.com.ar> | 2011-11-09 00:00:05 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2011-11-09 00:00:05 +0100 |
commit | f5e5aeb7125c065c535ecb0774ab48cb7ef4622e (patch) | |
tree | 141251b03a4dd888b67e04aa3eba7dc504bd7644 /package/webif/files/usr/lib/webif/apply.sh | |
parent | 789a7cf4069b86f1bd44c55d69205aff1837f906 (diff) |
webif: remove deprecated
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/webif/files/usr/lib/webif/apply.sh')
-rwxr-xr-x | package/webif/files/usr/lib/webif/apply.sh | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/package/webif/files/usr/lib/webif/apply.sh b/package/webif/files/usr/lib/webif/apply.sh deleted file mode 100755 index 9cbadf44a..000000000 --- a/package/webif/files/usr/lib/webif/apply.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/ash -# -# Default handlers for config files -# -HANDLERS_config=' - wireless) reload_wireless;; - network) reload_network;; - system) reload_system;; -' -HANDLERS_file=' - hosts) rm -f /etc/hosts; mv $config /etc/hosts; killall -HUP dnsmasq ;; - ethers) rm -f /etc/ethers; mv $config /etc/ethers; killall -HUP dnsmasq ;; - firewall) mv /tmp/.webif/file-firewall /etc/config/firewall && /etc/init.d/S45firewall;; -' - -# for some reason a for loop with "." doesn't work -eval "$(cat /usr/lib/webif/apply-*.sh 2>&-)" - -reload_network() { - echo '@TR<<Reloading>> @TR<<networking settings>> ...' - grep '^wan_' config-network >&- 2>&- && { - ifdown wan - ifup wan - killall -HUP dnsmasq - } - - grep '^lan_' config-network >&- 2>&- && { - ifdown lan - ifup lan - killall dnsmasq - /etc/init.d/S??dnsmasq - } -} - -reload_wireless() { - echo '@TR<<Reloading>> @TR<<wireless settings>> ...' - killall nas >&- 2>&- && sleep 2 - ( - /sbin/wifi - [ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa - ) >&- 2>&- <&- -} - -reload_system() { - echo '@TR<<Applying>> @TR<<system settings>> ...' - echo "$(nvram get wan_hostname)" > /proc/sys/kernel/hostname -} - -cd /tmp/.webif - -# file-* other config files -for config in $(ls file-* 2>&-); do - name=${config#file-} - echo "@TR<<Processing>> @TR<<config file>>: $name" - eval 'case "$name" in - '"$HANDLERS_file"' - esac' -done - -# config-* simple config files -( - cd /proc/self - cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && { - cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set - echo "@TR<<Committing>> NVRAM ..." - nvram commit - } -) -for config in $(ls config-* 2>&-); do - name=${config#config-} - eval 'case "$name" in - '"$HANDLERS_config"' - esac' -done -sleep 2 -rm -f config-* |