diff options
author | lassulus <lass@aidsballs.de> | 2014-04-21 00:09:03 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2014-04-21 00:09:03 +0200 |
commit | 6c8535ee8fdfa2d0918ec4c8f345f1d6a18589e5 (patch) | |
tree | 8f695b517b501598bc556abaff7ed94e5af0e6ce /retiolum | |
parent | e789586369ac1b9c8109f96050d9ecc30e9883d2 (diff) | |
parent | dd5d0af9e64e343e68d5b3fc766767f5ebfa9a89 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum')
-rw-r--r--[-rwxr-xr-x] | retiolum/Makefile | 0 | ||||
-rwxr-xr-x | retiolum/bin/hosts | 4 | ||||
-rwxr-xr-x | retiolum/bin/update-retiolum-hosts | 2 | ||||
-rwxr-xr-x | retiolum/bin/update_tinc_hosts | 7 |
4 files changed, 5 insertions, 8 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile index 54683469..54683469 100755..100644 --- a/retiolum/Makefile +++ b/retiolum/Makefile diff --git a/retiolum/bin/hosts b/retiolum/bin/hosts index 4856d494..44dbd88d 100755 --- a/retiolum/bin/hosts +++ b/retiolum/bin/hosts @@ -6,8 +6,8 @@ netname=${1-retiolum} cd /etc/tinc/$netname/hosts for i in `ls`; do - sed -n ' - s|^ *Subnet *= *\([^ /]*\)\(/[0-9]*\)\? *$|\1\t'$i'.'$netname' '$i'|p + sed -En ' + s|^ *Subnet *= *([^ /]*)(/[0-9]*)? *$|\1 '$i'.'$netname' '$i'|p ' $i done | sort diff --git a/retiolum/bin/update-retiolum-hosts b/retiolum/bin/update-retiolum-hosts index eb57af3f..0eae1c29 100755 --- a/retiolum/bin/update-retiolum-hosts +++ b/retiolum/bin/update-retiolum-hosts @@ -8,7 +8,7 @@ if test "${nosudo-false}" != true -a `id -u` != 0; then fi # cd //retiolum -cd $(dirname $(readlink -f $0))/.. +cd -P "$(dirname "$0")/.." mkdir -p /etc/tinc/retiolum/hosts rsync -va -I --delete hosts/ /etc/tinc/retiolum/hosts/ diff --git a/retiolum/bin/update_tinc_hosts b/retiolum/bin/update_tinc_hosts index ce1be497..46076cf2 100755 --- a/retiolum/bin/update_tinc_hosts +++ b/retiolum/bin/update_tinc_hosts @@ -7,11 +7,8 @@ if test "${nosudo-false}" != true -a `id -u` != 0; then exit 23 # go to hell fi -list_hosts="$( - basename="`readlink -f "$0"`" - bindir="`dirname "$basename"`" - echo "$bindir/hosts" -)" +list_hosts=$(cd -P "$(dirname "$0")" && pwd -P)/hosts + hosts() { "$list_hosts"; } hosts="${hosts-/etc/hosts}" |