summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-25 15:07:08 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-02-26 15:13:12 +0000
commit592256a0cfb369429b2e66bcb77dc1bf69997af0 (patch)
tree18a097d901a986a49c637791f585ba5a9b24a9be
parent5d8f6c4747c272135ac88f89995910552f872765 (diff)
downloadmorphs-592256a0cfb369429b2e66bcb77dc1bf69997af0.tar.gz
trove-early-setup.service should not be in /var
Move the unit and the .needed file to /etc to avoid confusion over whether /var is mounted. The actual commands are OK to depend on stuff in /var because we require local-fs.target.
-rwxr-xr-xtrove.configure8
1 files changed, 4 insertions, 4 deletions
diff --git a/trove.configure b/trove.configure
index 76d66e1..0ea9e4d 100755
--- a/trove.configure
+++ b/trove.configure
@@ -136,7 +136,7 @@ fi
##########################################################################
echo "Create trove-early-setup unit file"
-cat <<EOF > "$ROOT/var/lib/trove-setup/trove-early-setup.service"
+cat <<EOF > "$ROOT/etc/systemd/system/trove-early-setup.service"
[Unit]
Description=Run trove-early-setup (once)
Requires=network.target
@@ -145,7 +145,7 @@ Requires=opensshd.service
After=opensshd.service
Requires=local-fs.target
After=local-fs.target
-ConditionPathExists=/var/lib/trove-setup/needed
+ConditionPathExists=/etc/trove-setup.needed
[Service]
Type=oneshot
@@ -161,10 +161,10 @@ ExecStart=/bin/su git -c 'ssh git@localhost as distbuild sshkey add default < /v
ExecStart=/bin/su git -c 'ssh git@localhost as mason sshkey add default < /var/lib/trove-setup/mason.key.pub'
ExecStart=/bin/mkdir -p /var/run/lighttpd/
ExecStart=/bin/chown cache:cache /var/run/lighttpd/
-ExecStart=/bin/rm /var/lib/trove-setup/needed
+ExecStart=/bin/rm /etc/trove-setup.needed
ExecStart=/sbin/reboot
Restart=no
EOF
-ln -s "/var/lib/trove-setup/trove-early-setup.service" \
+ln -s "/etc/systemd/system/trove-early-setup.service" \
"$ROOT/etc/systemd/system/multi-user.target.wants/trove-early-setup.service"