diff --git a/internal/app/wwctl/container/exec/main.go b/internal/app/wwctl/container/exec/main.go index c57cc731..a0d1787e 100644 --- a/internal/app/wwctl/container/exec/main.go +++ b/internal/app/wwctl/container/exec/main.go @@ -124,10 +124,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error { } } - // getting syncuser from cmd, e.g., shell comamnd will call exec command and passing --syncuser - if syncUserFlag, err := cmd.Flags().GetBool("syncuser"); err == nil { - SyncUser = SyncUser || syncUserFlag - } userdbChanged := false if !beforePasswdTime.IsZero() { afterPasswdTime := getTime(path.Join(containerPath, "/etc/passwd")) diff --git a/internal/app/wwctl/container/shell/main.go b/internal/app/wwctl/container/shell/main.go index 2d2cc5a9..d31ecdc6 100644 --- a/internal/app/wwctl/container/shell/main.go +++ b/internal/app/wwctl/container/shell/main.go @@ -22,11 +22,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error { wwlog.Error("Unknown Warewulf container: %s", containerName) os.Exit(1) } - /* - for _, b := range binds { - allargs = append(allargs, "--bind", b) - } - */ shellName := os.Getenv("SHELL") if !container.ValidSource(containerName) { wwlog.Error("Unknown Warewulf container: %s", containerName) @@ -49,5 +44,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error { wwlog.Debug("Calling exec with args: %s", allargs) cntexec.SetBinds(binds) cntexec.SetNode(nodeName) + cntexec.SyncUser = syncUser return cntexec.CobraRunE(cmd, allargs) }