X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ffiles%2Fstatic-mirroring%2Fstatic-master-update-component;h=64836ba2bc0172601a8222d26e74a96bf4fc092e;hb=543f9e26eafdac328bc56b3ca19d51c1e522b876;hp=82bae0d81041f67791993553cff09b2f14b84ce3;hpb=b762782a06b2fff4d656866def1c5267835be269;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/files/static-mirroring/static-master-update-component b/modules/roles/files/static-mirroring/static-master-update-component index 82bae0d81..64836ba2b 100755 --- a/modules/roles/files/static-mirroring/static-master-update-component +++ b/modules/roles/files/static-mirroring/static-master-update-component @@ -81,8 +81,8 @@ if [ "${component%/*}" != "$component" ] ; then exit 1 fi -srchost="$(awk -v this_host="$(hostname -f)" component="$component" '$1 == this_host && $2 == component {print $3; exit}' "$componentlist")" -srcdir="$(awk -v this_host="$(hostname -f)" component="$component" '$1 == this_host && $2 == component {print $4; exit}' "$componentlist")" +srchost="$(awk -v this_host="$(hostname -f)" -v component="$component" '!/^ *(#|$)/ && $1 == this_host && $2 == component {print $3; exit}' "$componentlist")" +srcdir="$(awk -v this_host="$(hostname -f)" -v component="$component" '!/^ *(#|$)/ && $1 == this_host && $2 == component {print $4; exit}' "$componentlist")" if [ -z "$srchost" ] || [ -z "$srcdir" ]; then echo >&2 "$0: Invalid component: $component (not found in $componentlist)"; exit 1