summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-04-22 09:45:27 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2011-04-22 09:45:27 (GMT)
commit983158e225c2947010e078bcd2f62205d9ee6911 (patch)
treebe43642dc9f9fb9ff669264a3176c82962bbb155
parent3510193460d7eb9eca2b944212ee84cabe4996a6 (diff)
downloadbuildroot-983158e225c2947010e078bcd2f62205d9ee6911.tar.gz
buildroot-983158e225c2947010e078bcd2f62205d9ee6911.tar.bz2
target-generic-hostname: add /etc/hosts entry as well
Some applications (like proftpd) tries to resolve hostname at startup, so add it to /etc/hosts. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--target/generic/Makefile.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in
index 3a750c3..ba6e4b0 100644
--- a/target/generic/Makefile.in
+++ b/target/generic/Makefile.in
@@ -6,6 +6,8 @@ TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE
target-generic-hostname:
mkdir -p $(TARGET_DIR)/etc
echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
+ $(SED) '$$a \127.0.1.1\t$(TARGET_GENERIC_HOSTNAME)' \
+ -e '/^127.0.1.1/d' $(TARGET_DIR)/etc/hosts
target-generic-issue:
mkdir -p $(TARGET_DIR)/etc