summaryrefslogtreecommitdiffstats
path: root/retiolum
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum')
-rwxr-xr-xretiolum/bin/update_tinc_hosts8
1 files changed, 6 insertions, 2 deletions
diff --git a/retiolum/bin/update_tinc_hosts b/retiolum/bin/update_tinc_hosts
index 7be30c2a..ce1be497 100755
--- a/retiolum/bin/update_tinc_hosts
+++ b/retiolum/bin/update_tinc_hosts
@@ -7,8 +7,12 @@ if test "${nosudo-false}" != true -a `id -u` != 0; then
exit 23 # go to hell
fi
-DIRNAME=`dirname $0`
-export PATH="`readlink -f $DIRNAME`:$PATH"
+list_hosts="$(
+ basename="`readlink -f "$0"`"
+ bindir="`dirname "$basename"`"
+ echo "$bindir/hosts"
+)"
+hosts() { "$list_hosts"; }
hosts="${hosts-/etc/hosts}"