amazon-init.service: fix starting services at startup

We now make it happen later in the boot process so that multi-user
has already activated, so as to not run afoul of the logic in
switch-to-configuration.pl. It's not my favorite solution, but at
least it works. Also added a check to the VM test to catch the failure
so we don't break in future.

Fixes #23121
This commit is contained in:
Dan Peebles 2017-02-27 16:51:36 +00:00
parent bccac381b2
commit 6018cf4a69
2 changed files with 21 additions and 5 deletions

View file

@ -45,9 +45,8 @@ in {
inherit script;
description = "Reconfigure the system from EC2 userdata on startup";
wantedBy = [ "sshd.service" ];
before = [ "sshd.service" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
requires = [ "network-online.target" ];
restartIfChanged = false;