diff options
Diffstat (limited to 'lib/load-configuration')
-rwxr-xr-x | lib/load-configuration | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/load-configuration b/lib/load-configuration index f20dc2d..05ec7d0 100755 --- a/lib/load-configuration +++ b/lib/load-configuration @@ -16,7 +16,15 @@ if [ "$(hostname)" = 'buildmaster.archlinux32.org' ]; then [ -f '/tmp/do-not-run-build-master' ]; then >&2 echo 'mysqld is not running or build master is on halt' >&2 echo 'I will abort - whatever you try to do would probably fail anyway.' - exit 1 + # When the buildmaster is on halt, + # - systemd MUST NOT hickup - e.g. exit code 0, + # - connecting slaves MUST get exit code 1 and + # - interactively run commands SHOULD get exit code 1, too + if tty -s && [ -z "${SSH_ORIGINAL_COMMAND}" ]; then + exit 1 + else + exit 0 + fi fi else i_am_the_master=false |