mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
incusd/instances: Support last-state value for boot.autostart
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
@@ -204,7 +204,7 @@ func instanceShouldAutoStart(inst instance.Instance) bool {
|
||||
autoStart := config["boot.autostart"]
|
||||
lastState := config["volatile.last_state.power"]
|
||||
|
||||
return util.IsTrue(autoStart) || (autoStart == "" && lastState == instance.PowerStateRunning)
|
||||
return util.IsTrue(autoStart) || ((autoStart == "" || autoStart == "last-state") && lastState == instance.PowerStateRunning)
|
||||
}
|
||||
|
||||
func instancesStart(s *state.State, instances []instance.Instance) {
|
||||
|
||||
Reference in New Issue
Block a user