summaryrefslogtreecommitdiff
path: root/firehose.configure
diff options
context:
space:
mode:
Diffstat (limited to 'firehose.configure')
-rw-r--r--firehose.configure20
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]