|
|
@ -69,14 +69,11 @@ func parseArgs() *initState {
|
|
|
|
log.Error("oz-init must run as root\n")
|
|
|
|
log.Error("oz-init must run as root\n")
|
|
|
|
os.Exit(1)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// We should check that the file contains config.InitPath, but
|
|
|
|
|
|
|
|
// since proc is not mounted in this state is still doesn't exist.
|
|
|
|
if os.Getpid() != 1 {
|
|
|
|
/*
|
|
|
|
log.Error("oz-init must be launched in new pid namespace.")
|
|
|
|
if _, err := os.Stat("/proc/1/cmdline"); !os.IsNotExist(err) {
|
|
|
|
|
|
|
|
log.Error("What are you doing? Oz-init cannot be launched manually")
|
|
|
|
|
|
|
|
os.Exit(1)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getvar := func(name string) string {
|
|
|
|
getvar := func(name string) string {
|
|
|
|
val := os.Getenv(name)
|
|
|
|
val := os.Getenv(name)
|
|
|
|