mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00

this is a logical place to get changes upstream before they grow out of control. this pr is the first in an effort to deduplicate machine code and streamline code flow. a lot of code is simply moved to eliminate circular imports. names and specific paths can ultimately be changed. i dont like some of the descriptive interface names, etc. ultimately, i think once we have the "old" code sanitized, we can re-use some of those. clearly some of what is in here is temporary and will either be deleted, changed, or moved again as this effort comes to a close. right now, the machine code does not use any of the "new" code. you will see in `init` and `rm` some commented out code that hooks it. i'm afraid things will get worse before they get better (way worse). [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
12 lines
160 B
Go
12 lines
160 B
Go
package machine
|
|
|
|
import "os"
|
|
|
|
func getRuntimeDir() (string, error) {
|
|
tmpDir, ok := os.LookupEnv("TMPDIR")
|
|
if !ok {
|
|
tmpDir = "/tmp"
|
|
}
|
|
return tmpDir, nil
|
|
}
|