From faa8a3015f4fb75f4ba67b0f56eb145b562e7bc3 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 23 Jul 2021 13:53:08 +0300 Subject: [PATCH] static dns: acquire hostname through 'busybox hostname' Separate hostname utility could be unavailable. --- system/arm/bin/update-static-dns | 2 +- system/x86/bin/update-static-dns | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/arm/bin/update-static-dns b/system/arm/bin/update-static-dns index 6be236f..4a430c5 100755 --- a/system/arm/bin/update-static-dns +++ b/system/arm/bin/update-static-dns @@ -2,7 +2,7 @@ export PATH=/system/bin -echo "127.0.0.1 localhost $(hostname)" > /system/etc/hosts +echo "127.0.0.1 localhost $(busybox hostname)" > /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 diff --git a/system/x86/bin/update-static-dns b/system/x86/bin/update-static-dns index 6be236f..4a430c5 100755 --- a/system/x86/bin/update-static-dns +++ b/system/x86/bin/update-static-dns @@ -2,7 +2,7 @@ export PATH=/system/bin -echo "127.0.0.1 localhost $(hostname)" > /system/etc/hosts +echo "127.0.0.1 localhost $(busybox hostname)" > /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