diff options
| author | makefu <github@syntax-fehler.de> | 2013-03-07 11:40:38 +0100 |
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2013-03-07 11:40:38 +0100 |
| commit | 7fa8fb85b072f612adb322f8a02617e1bd737020 (patch) | |
| tree | 683df8268baae71451633518aa7ff7ea258a4aa8 /retiolum/bin/update_tinc_hosts | |
| parent | dbe2d838ba6834788265029162b2dd7d82473335 (diff) | |
| parent | ef4eb3189363f5cd9a33b43693322a68d3142979 (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}" |
