1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Refactor to use libcompose

This commit is contained in:
Darren Shepherd
2015-08-04 14:45:38 -07:00
parent 19f9a1b281
commit 9d76b79ac3
26 changed files with 665 additions and 1458 deletions

View File

@@ -44,15 +44,14 @@ func copyMoveRoot(rootfs string) error {
filename := path.Join("/", file.Name())
if filename == rootfs {
log.Debugf("Skipping Deleting %s", filename)
continue
}
log.Debugf("Deleting %s", filename)
//if err := os.Remove(filename); err != nil {
if err := os.RemoveAll(filename); err != nil {
return err
}
//}
}
return nil
@@ -90,7 +89,7 @@ func switchRoot(rootfs string) error {
}
log.Debugf("Successfully moved to new root at %s", rootfs)
os.Setenv("DOCKER_RAMDISK", "false")
os.Unsetenv("DOCKER_RAMDISK")
return nil
}