exit 1
fi
-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")"
+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
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]) {
one_more_arg "$@"
local serial="$1"; shift
- masterhost="$(awk -v component="$component" '$2 == component {print $1; exit}' "$COMPONENTLIST")"
+ masterhost="$(awk -v component="$component" '!/^ *(#|$)/ && $2 == component {print $1; exit}' "$COMPONENTLIST")"
if [ -z "$masterhost" ]; then
croak "Did not find master for component $component."
elif [ "$masterhost" != "$remote_host" ]; then
local remote_host="$1"; shift
local args="--server --sender -vlHtrze.iLsf --safe-links ."
- for component in $(awk -v this_host="$(hostname -f)" '$1 == this_host {print $2}' $COMPONENTLIST); do
+ for component in $(awk -v this_host="$(hostname -f)" '!/^ *(#|$)/ && $1 == this_host {print $2}' $COMPONENTLIST); do
if [ "$*" = "$args $component/-new-/" ] || [ "$*" = "$args ./$component/-new-/" ] ; then
local path="$BASEDIR/master/$component-current-push"
info "serving $remote_host with $path"
allowed_rsyncs=()
if [ -e "$COMPONENTLIST" ]; then
- for path in $(awk -v host="$(hostname -f)" '$3 == host {print $4}' $COMPONENTLIST); do
+ for path in $(awk -v host="$(hostname -f)" '!/^ *(#|$)/ && $3 == host {print $4}' $COMPONENTLIST); do
allowed_rsyncs+=("--server --sender -lHtrze.iLsf --safe-links . $path/.")
done
fi
hit="$(
awk -v this_host="$(hostname -f)" -v component="$component" -v host="$remote_host" '
- $1 == this_host && $2 == component {
+ !/^ *(#|$)/ && $1 == this_host && $2 == component {
if ($3 == host) {
print $4
exit