From: Jo-Philipp Wich Date: Wed, 24 Sep 2008 22:45:20 +0000 (+0000) Subject: * luci-0.8: backport luci_hosts init order fix X-Git-Tag: 0.8.0~35 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=41aeb0d56b81b445ba794859ea07cd1e9516d1f5;p=project%2Fluci.git * luci-0.8: backport luci_hosts init order fix --- diff --git a/modules/admin-core/root/etc/init.d/luci_hosts b/modules/admin-core/root/etc/init.d/luci_hosts index d01bfbbd55..3c1034a6e3 100755 --- 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 }