Move syncuser pass from shell to exec
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user