Merge pull request #1784 from pierrchen/master
libcontainer/rootfs_linux: minor cleanup
This commit is contained in:
commit
63e6708c74
|
@ -46,7 +46,6 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
|
||||||
return newSystemErrorWithCause(err, "preparing rootfs")
|
return newSystemErrorWithCause(err, "preparing rootfs")
|
||||||
}
|
}
|
||||||
|
|
||||||
setupDev := needsSetupDev(config)
|
|
||||||
for _, m := range config.Mounts {
|
for _, m := range config.Mounts {
|
||||||
for _, precmd := range m.PremountCmds {
|
for _, precmd := range m.PremountCmds {
|
||||||
if err := mountCmd(precmd); err != nil {
|
if err := mountCmd(precmd); err != nil {
|
||||||
|
@ -65,6 +64,8 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setupDev := needsSetupDev(config)
|
||||||
|
|
||||||
if setupDev {
|
if setupDev {
|
||||||
if err := createDevices(config); err != nil {
|
if err := createDevices(config); err != nil {
|
||||||
return newSystemErrorWithCause(err, "creating device nodes")
|
return newSystemErrorWithCause(err, "creating device nodes")
|
||||||
|
|
Loading…
Reference in New Issue