Fix linting issues

This commit is contained in:
WestleyR
2021-09-06 12:03:04 -07:00
parent 31e9929984
commit 4edc16953e
71 changed files with 470 additions and 363 deletions

View File

@@ -15,14 +15,27 @@ import (
func main() {
if os.Args[0] == "/warewulf/bin/wwclient" {
os.Chdir("/")
err := os.Chdir("/")
if err != nil {
wwlog.Printf(wwlog.ERROR, "failed to change dir: %s", err)
os.Exit(1)
}
log.Printf("Updating live file system LIVE, cancel now if this is in error")
time.Sleep(5000 * time.Millisecond)
} else {
fmt.Printf("Called via: %s\n", os.Args[0])
fmt.Printf("Runtime overlay is being put in '/warewulf/wwclient-test' rather than '/'\n")
os.MkdirAll("/warewulf/wwclient-test", 0755)
os.Chdir("/warewulf/wwclient-test")
err := os.MkdirAll("/warewulf/wwclient-test", 0755)
if err != nil {
wwlog.Printf(wwlog.ERROR, "failed to create dir: %s", err)
os.Exit(1)
}
err = os.Chdir("/warewulf/wwclient-test")
if err != nil {
wwlog.Printf(wwlog.ERROR, "failed to change dir: %s", err)
os.Exit(1)
}
}
conf, err := warewulfconf.New()

View File

@@ -7,5 +7,6 @@ import (
func main() {
root := wwctl.GetRootCommand()
//nolint:errcheck
root.Execute()
}