diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-09-01 15:19:02 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-09-01 15:19:02 +0100 |
commit | 9ce0a8102cc5b99eb7211bf60a6f46ce7f3b68e0 (patch) | |
tree | b1f2d193287c849da49cbfd36b8aea616c9d8f8f | |
parent | 355826e9e25f802718b0b53cd286b4e39c174aa3 (diff) | |
download | firehose-9ce0a8102cc5b99eb7211bf60a6f46ce7f3b68e0.tar.gz |
Fix variable pre-checking in firehose.configure
Change-Id: I394d64caa0cc908e1ae7b45ffca9a9a844093d2d
-rw-r--r-- | firehose.configure | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/firehose.configure b/firehose.configure index 9c809f6..cde8b98 100644 --- a/firehose.configure +++ b/firehose.configure @@ -3,6 +3,16 @@ set -e ROOT="$1" +# Check necessary parameters were filled in firehose.morph before +# the system was deployed, and exit if not +if [ -z "$GERRIT_USERNAME" -o \ + -z "$GERRIT_USER" -o \ + -z "$GERRIT_URL" -o \ + -z "$GIT_USERNAME" -o \ + -z "$GIT_EMAIL" ]; then + exit 0 +fi + # Add firehose user chroot "$ROOT" adduser "$GERRIT_USER" -s /bin/false -D chroot "$ROOT" sudo -u "$GERRIT_USER" --ssh-keygen -C "$GERRIT_USER@baserock.org" -N "" @@ -33,16 +43,6 @@ chroot "$ROOT" systemctl enable firehose.timer chroot "$ROOT" systemctl start firehose.timer chroot "$ROOT" systemctl enable firehose.service -# Check necessary parameters were filled in firehose.morph before -# the system was deployed, and exit if not -if - [ -z "$GERRIT_USERNAME" -a \ - -z "$GERRIT_URL" -a \ - -z "$GIT_USERNAME" -a \ - -z "$GIT_EMAIL" -a]; then - exit 0 -fi - # Create firehose.conf to store parameters obtained from .morph file cat >>"$ROOT/etc/firehose.conf" <<EOF [config] |