projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4538b12
)
* luci/modules/admin-core: make sure luci_hosts is executed before dnsmasq
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 24 Sep 2008 22:44:36 +0000
(22:44 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 24 Sep 2008 22:44:36 +0000
(22:44 +0000)
modules/admin-core/root/etc/init.d/luci_hosts
patch
|
blob
|
history
diff --git
a/modules/admin-core/root/etc/init.d/luci_hosts
b/modules/admin-core/root/etc/init.d/luci_hosts
index d01bfbbd55f96736aa737de8681a260211aaafb7..3c1034a6e303a762d66a025a25a8ce5a629f3848 100755
(executable)
--- a/
modules/admin-core/root/etc/init.d/luci_hosts
+++ b/
modules/admin-core/root/etc/init.d/luci_hosts
@@
-1,5
+1,5
@@
#!/bin/sh /etc/rc.common
-START=
60
+START=
59
apply_host() {
local cfg="$1"
@@
-8,7
+8,7
@@
apply_host() {
config_get ipaddr "$cfg" ipaddr
[ -n "$hostname" -a -n "$ipaddr" ] || return 0
-
+
echo "$ipaddr $hostname" >> /var/etc/hosts
}
@@
-20,15
+20,15
@@
start() {
test -d /var/etc || mkdir -p /var/etc
test -f /etc/hosts.local && cat /etc/hosts.local >> /var/etc/hosts
-
+
config_load luci_hosts
config_foreach apply_host host
-
+
return 0
}
stop() {
test -f /var/etc/hosts && rm -f /var/etc/hosts
-
+
return 0
}