static dns: add current hostname as alias to localhost

This commit is contained in:
Leonid Pliushch
2021-07-23 13:50:58 +03:00
parent fa3bab8419
commit fdd10abd36
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
export PATH=/system/bin export PATH=/system/bin
echo "127.0.0.1 localhost" > /system/etc/hosts echo "127.0.0.1 localhost $(hostname)" > /system/etc/hosts
echo "::1 ip6-localhost" >> /system/etc/hosts echo "::1 ip6-localhost" >> /system/etc/hosts
for host in $(busybox cat /system/etc/static-dns-hosts.txt | busybox grep -vE '^\s*#'); do for host in $(busybox cat /system/etc/static-dns-hosts.txt | busybox grep -vE '^\s*#'); do

View File

@@ -2,7 +2,7 @@
export PATH=/system/bin export PATH=/system/bin
echo "127.0.0.1 localhost" > /system/etc/hosts echo "127.0.0.1 localhost $(hostname)" > /system/etc/hosts
echo "::1 ip6-localhost" >> /system/etc/hosts echo "::1 ip6-localhost" >> /system/etc/hosts
for host in $(busybox cat /system/etc/static-dns-hosts.txt | busybox grep -vE '^\s*#'); do for host in $(busybox cat /system/etc/static-dns-hosts.txt | busybox grep -vE '^\s*#'); do