diff options
author | makefu <github@syntax-fehler.de> | 2013-02-07 20:26:15 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-02-07 20:26:15 +0100 |
commit | dd6ad821a5a5bcb633b28a6d35e5e612d1f59094 (patch) | |
tree | 51a5281d1cbba3423eb5e9a86eb16d847fac5a6e /retiolum/bin/update_tinc_hosts | |
parent | 12fa3df06555c4ad6973602998a42446fbb52e70 (diff) | |
parent | 41fb505a5dc5c81965cc45dd00d14fe4150b8a42 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum/bin/update_tinc_hosts')
-rwxr-xr-x | retiolum/bin/update_tinc_hosts | 8 |
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}" |