trunk: drop luci_hosts, now covered by /etc/config/dhcp
[project/luci.git] / modules / admin-core / root / etc / init.d / luci_hosts
diff --git a/modules/admin-core/root/etc/init.d/luci_hosts b/modules/admin-core/root/etc/init.d/luci_hosts
deleted file mode 100755 (executable)
index 8b8305d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=59
-
-apply_host() {
-       local cfg="$1"
-
-       config_get hostname "$cfg" hostname
-       config_get ipaddr   "$cfg" ipaddr
-
-       [ -n "$hostname" -a -n "$ipaddr" ] || return 0
-
-       echo "$ipaddr $hostname" >> /var/etc/hosts
-}
-
-start() {
-       if [ ! -L /etc/hosts ]; then
-               test -f /etc/hosts && mv /etc/hosts /etc/hosts.local
-               ln -s /var/etc/hosts /etc/hosts
-       fi
-
-       echo "# This file is autogenerated, use /etc/hosts.local instead" > /var/etc/hosts
-
-       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_load luci_etherhosts
-       config_foreach apply_host host
-       config_foreach apply_host entry
-
-       return 0
-}
-
-stop() {
-       test -f /var/etc/hosts && rm -f /var/etc/hosts
-
-       return 0
-}