summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ping-from-slave14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/ping-from-slave b/bin/ping-from-slave
index 26fd8c9..94fa1c8 100755
--- a/bin/ping-from-slave
+++ b/bin/ping-from-slave
@@ -42,17 +42,21 @@ if [ "${status% *}" != '1' ]; then
printf ' SET `build_slaves`.`is_sane`=0'
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${slave}" | base64 -w0)"
- printf 'SELECT CONCAT('
- printf '`persons`.`name`,": Your buildslave \\"",'
- printf '`build_slaves`.`name`,"\\" builds some outdated package."'
- printf ') FROM `build_slaves`'
+ printf 'SELECT'
+ printf ' `persons`.`name`,'
+ printf '`build_slaves`.`name`'
+ printf ' FROM `build_slaves`'
mysql_join_build_slaves_ssh_keys
mysql_join_ssh_keys_persons
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${slave}" | base64 -w0)"
} | \
mysql_run_query | \
- irc_say
+ while read -r operator slave; do
+ printf '/j %s Your buildslave "%s" builds some outdated package.\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
+ done
fi
fi
exit 2