X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Froles%2Ffiles%2Fstatic-mirroring%2Fstatic-update-component;h=f8ca81ee060a418e7c7b46f95e1822f68bbe9e1c;hb=3a9af9163cb5c8ba3253f498c56bf656cbaf1517;hp=2cae0b8b4c6059412bd62a4f088bacf701822dba;hpb=96f90b2ca6cb2999b42749808e89bd8bba0b87d8;p=dsa-puppet.git diff --git a/modules/roles/files/static-mirroring/static-update-component b/modules/roles/files/static-mirroring/static-update-component index 2cae0b8b..f8ca81ee 100755 --- a/modules/roles/files/static-mirroring/static-update-component +++ b/modules/roles/files/static-mirroring/static-update-component @@ -41,12 +41,12 @@ if [ "${component%/*}" != "$component" ] ; then fi thishost=$(hostname -f) -masterhost="$(awk -v component="$component" '$2 == component {print $1; exit}' "$componentlist")" -srchost="$(awk -v component="$component" '$2 == component {print $3; exit}' "$componentlist")" -srcdir="$(awk -v component="$component" '$2 == component {print $4; exit}' "$componentlist")" +masterhost="$(awk -v component="$component" '!/^ *(#|$)/ && $2 == component {print $1; exit}' "$componentlist")" +srchost="$(awk -v component="$component" '!/^ *(#|$)/ && $2 == component {print $3; exit}' "$componentlist")" +srcdir="$(awk -v component="$component" '!/^ *(#|$)/ && $2 == component {print $4; exit}' "$componentlist")" inextralist="$( awk -v component="$component" -v host="$thishost" ' - $2 == component { + !/^ *(#|$)/ && $2 == component { split($5,extra,",") for (i in extra) { if (host == extra[i]) { @@ -75,7 +75,7 @@ fi if [ "`id -nu`" != "staticsync" ]; then sudo -u staticsync static-update-component "$@" else - ssh -o AddressFamily=inet -t -o ServerAliveInterval=300 -o PreferredAuthentications=publickey "$masterhost" static-master-update-component "$component" + ssh -o AddressFamily=inet -t -t -o ServerAliveInterval=300 -o PreferredAuthentications=publickey "$masterhost" static-master-update-component "$component" fi # vim:set et: