bib: tweak EnsureEnvironment() based on the feedback from Colin
This commit is contained in:
parent
4fa198c18d
commit
1ea8e87fad
1 changed files with 8 additions and 7 deletions
|
|
@ -48,18 +48,19 @@ func EnsureEnvironment() error {
|
|||
if err := util.RunCmdSync("chcon", installType, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ensure we have devfs inside the container to get dynamic loop
|
||||
// loop devices inside the container.
|
||||
if err := util.RunCmdSync("mount", "-t", "devtmpfs", "devtmpfs", "/dev"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Create a bind mount into our target location; we can't copy it because
|
||||
// again we have to perserve the SELinux label.
|
||||
if err := util.RunCmdSync("mount", "--bind", destPath, osbuildPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ensure we have devfs inside the container to get dynamic loop
|
||||
// loop devices inside the container.
|
||||
devMnt := "/dev/"
|
||||
if err := util.RunCmdSync("mount", "-t", "devtmpfs", "devtmpfs", devMnt); err != nil {
|
||||
return err
|
||||
}
|
||||
// NOTE: Don't add new code here, do it before the bind mount which acts as the final success indicator
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue