always run commands in runcmd
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
parent
eb27f373ee
commit
6cad908751
@ -55,6 +55,12 @@ func Apply(cfg config.CloudConfig, ifaces []network.InterfaceGenerator, env *Env
|
||||
}
|
||||
}
|
||||
|
||||
for _, cmdline := range cfg.RunCMD {
|
||||
prog := strings.Fields(cmdline)[0]
|
||||
args := strings.Fields(cmdline)[1:]
|
||||
exec.Command(prog, args...).Run()
|
||||
}
|
||||
|
||||
lockf := path.Join(env.Workspace(), ".lock")
|
||||
|
||||
if _, err = os.Stat(lockf); err == nil {
|
||||
@ -72,12 +78,6 @@ func Apply(cfg config.CloudConfig, ifaces []network.InterfaceGenerator, env *Env
|
||||
log.Printf("Set hostname to %s", cfg.Hostname)
|
||||
}
|
||||
|
||||
for _, cmdline := range cfg.RunCMD {
|
||||
prog := strings.Fields(cmdline)[0]
|
||||
args := strings.Fields(cmdline)[1:]
|
||||
exec.Command(prog, args...).Run()
|
||||
}
|
||||
|
||||
for _, user := range cfg.Users {
|
||||
if user.Name == "" {
|
||||
log.Printf("User object has no 'name' field, skipping")
|
||||
|
Loading…
x
Reference in New Issue
Block a user