Make wwctl image syncuser --write true by default
It can be disabled with `wwctl image syncuser --write=false`. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -22,7 +22,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
if write && !build {
|
||||
// when write = true and build = false, we will print a warnning, this is the default case
|
||||
wwlog.Warn("Syncuser is completed, please remember to rebuild image or add `--build` flag for automatic rebuild after syncuser")
|
||||
wwlog.Warn("Syncuser is completed. Rebuild image or add `--build` flag for automatic rebuild after syncuser.")
|
||||
} else if write && build {
|
||||
// if write = true and build = true, then it'll trigger the image build after sync
|
||||
cbp := &wwapiv1.ImageBuildParameter{
|
||||
|
||||
@@ -29,7 +29,7 @@ uid/gid collision is detected. File ownerships are also changed.`,
|
||||
)
|
||||
|
||||
func init() {
|
||||
baseCmd.PersistentFlags().BoolVar(&write, "write", false, "Synchronize uis/gids and write files in image")
|
||||
baseCmd.PersistentFlags().BoolVar(&write, "write", true, "Synchronize uis/gids and write files in image")
|
||||
baseCmd.PersistentFlags().BoolVar(&build, "build", false, "Build image after syncuser is completed")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user