added binary to create bash completion

also do not bail out, when configs can't be read, still the
This commit is contained in:
Christian Goll
2021-07-16 14:32:39 +02:00
parent 75c0e66f30
commit b27951b59f
6 changed files with 42 additions and 4 deletions

View File

@@ -101,7 +101,8 @@ func init() {
c, err := os.OpenFile(ConfigFile, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not create new configuration file: %s\n", err)
os.Exit(1)
// just return silently, as init is also called for bash_completion
return
}
fmt.Fprintf(c, "nodeprofiles:\n")