[lxc] default to target runlevel 3

pull/5309/head
Chris Lundquist 10 years ago committed by Megan Marsh
parent ddbb584235
commit 15c18c83a9

@ -50,6 +50,10 @@ func NewConfig(raws ...interface{}) (*Config, error) {
c.ContainerName = fmt.Sprintf("packer-%s", c.PackerBuildName)
}
if c.TargetRunlevel == 0 {
c.TargetRunlevel = 3
}
if c.CommandWrapper == "" {
c.CommandWrapper = "{{.Command}}"
}

@ -93,7 +93,7 @@ func (s *StepWaitInit) waitForInit(state multistep.StateBag, cancel <-chan struc
log.Printf("Container finished init.")
break
} else if currentRunlevel > targetRunlevel {
log.Printf("Expected Runlevel %d, Got Runlevel %s, continuing", targetRunlevel, currentRunlevel)
log.Printf("Expected Runlevel %s, Got Runlevel %s, continuing", targetRunlevel, currentRunlevel)
break
}

Loading…
Cancel
Save