Merge pull request #30 from estesp/missing-rootfs-check

Make startup errors a bit friendlier
This commit is contained in:
Alexander Morozov
2015-06-26 09:03:49 -07:00
2 changed files with 8 additions and 2 deletions

View File

@@ -82,7 +82,6 @@ func main() {
// default action is to execute a container
app.Action = func(context *cli.Context) {
if os.Geteuid() != 0 {
cli.ShowAppHelp(context)
logrus.Fatal("runc should be run as root")
}
spec, err := loadSpec(context.Args().First())
@@ -91,7 +90,7 @@ func main() {
}
status, err := execContainer(context, spec)
if err != nil {
fatal(err)
logrus.Fatalf("Container start failed: %v", err)
}
// exit with the container's exit status so any external supervisor is
// notified of the exit with the correct exit status.