Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/load-configuration
diff options
context:
space:
mode:
Diffstat (limited to 'lib/load-configuration')
-rwxr-xr-xlib/load-configuration25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/load-configuration b/lib/load-configuration
index f327550..e434b4b 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -198,3 +198,28 @@ if [ "${master_build_server_identity}" = "${work_dir}/.ssh/id_rsa" ] && \
mkdir -p "${master_build_server_identity%/*}"
ssh-keygen -b4096 -f "${master_build_server_identity}"
fi
+
+if ${i_am_the_master}; then
+ # shellcheck disable=SC2016
+ {
+ printf 'INSERT INTO `command_log`(`command`,`parameters`,`shell`)'
+ printf ' VALUES ('
+ printf 'from_base64("%s"),' \
+ "$(
+ printf '%s' "${0##*/}" | \
+ base64
+ )"
+ printf 'from_base64("%s"),' \
+ "$(
+ printf '%s' "$*" | \
+ base64
+ )"
+ if tty -s; then
+ printf '1'
+ else
+ printf '0'
+ fi
+ printf ');\n'
+ } | \
+ mysql_run_query 'unimportant'
+fi