package initboot import ( "log" "strconv" "syscall" "novit.nc/direktil/inits/pkg/apply" "novit.nc/direktil/inits/pkg/sys" ) func setupFiles() { cfg := sys.Config() // make root rshared (default in systemd, required by Kubernetes 1.10+) // equivalent to "mount --make-rshared /" // see kernel's Documentation/sharedsubtree.txt (search rshared) if err := syscall.Mount("", "/", "", syscall.MS_SHARED|syscall.MS_REC, ""); err != nil { log.Fatalf("FATAL: mount --make-rshared / failed: %v", err) } // - setup root user if passwordHash := cfg.RootUser.PasswordHash; passwordHash == "" { sys.MustRun("/usr/bin/passwd", "-d", "root") } else { sys.MustRun("/bin/sh", "-c", "chpasswd --encrypted <