Merge pull request #451 from mrunalp/mounts_fix
mount: sysfs also doesn't need to be labelled like mqueue.
This commit is contained in:
commit
0596e6384a
|
@ -95,7 +95,7 @@ func mount(m *configs.Mount, rootfs, mountLabel string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch m.Device {
|
switch m.Device {
|
||||||
case "proc":
|
case "proc", "mqueue", "sysfs":
|
||||||
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
|
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -116,14 +116,10 @@ func mount(m *configs.Mount, rootfs, mountLabel string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
case "mqueue", "devpts", "sysfs":
|
case "devpts":
|
||||||
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
|
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if m.Device == "mqueue" {
|
|
||||||
// mqueue should not be labeled, otherwise the mount will fail
|
|
||||||
data = ""
|
|
||||||
}
|
|
||||||
return syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), data)
|
return syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), data)
|
||||||
case "bind":
|
case "bind":
|
||||||
stat, err := os.Stat(m.Source)
|
stat, err := os.Stat(m.Source)
|
||||||
|
|
Loading…
Reference in New Issue