fixed wrong WWCLIENTLOC synatx in in-files
This commit is contained in:
@@ -11,3 +11,4 @@ TFTPDIR ?= @TFTPDIR@
|
|||||||
FIREWALLDDIR ?= @FIREWALLDDIR@
|
FIREWALLDDIR ?= @FIREWALLDDIR@
|
||||||
SYSTEMDDIR ?= @SYSTEMDDIR@
|
SYSTEMDDIR ?= @SYSTEMDDIR@
|
||||||
BASH_COMPLETION ?= @BASH_COMPLETION@
|
BASH_COMPLETION ?= @BASH_COMPLETION@
|
||||||
|
WWCLIENTLOC ?= @WWCLIENTLOC@
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
@@ -62,7 +63,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
|||||||
return errors.New("found pidfile " + PIDFile + " not starting")
|
return errors.New("found pidfile " + PIDFile + " not starting")
|
||||||
}
|
}
|
||||||
|
|
||||||
if os.Args[0] == buildconfig.WWCLIENTLOC() {
|
if os.Args[0] == path.Join(buildconfig.WWCLIENTLOC(), "wwclient") {
|
||||||
err := os.Chdir("/")
|
err := os.Chdir("/")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
wwlog.Printf(wwlog.ERROR, "failed to change dir: %s", err)
|
wwlog.Printf(wwlog.ERROR, "failed to change dir: %s", err)
|
||||||
@@ -74,6 +75,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
|||||||
} else {
|
} else {
|
||||||
fmt.Printf("Called via: %s\n", os.Args[0])
|
fmt.Printf("Called via: %s\n", os.Args[0])
|
||||||
fmt.Printf("Runtime overlay is being put in '/warewulf/wwclient-test' rather than '/'\n")
|
fmt.Printf("Runtime overlay is being put in '/warewulf/wwclient-test' rather than '/'\n")
|
||||||
|
fmt.Printf("For full functionality call with: %s\n", path.Join(buildconfig.WWCLIENTLOC(), "wwclient"))
|
||||||
err := os.MkdirAll("/warewulf/wwclient-test", 0755)
|
err := os.MkdirAll("/warewulf/wwclient-test", 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
wwlog.Printf(wwlog.ERROR, "failed to create dir: %s", err)
|
wwlog.Printf(wwlog.ERROR, "failed to create dir: %s", err)
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ func init() {
|
|||||||
wwprovisiondir = "@WWPROVISIONDIR@"
|
wwprovisiondir = "@WWPROVISIONDIR@"
|
||||||
version = "@VERSION@"
|
version = "@VERSION@"
|
||||||
release = "@RELEASE@"
|
release = "@RELEASE@"
|
||||||
wwclientloc = "@WWCLIENTLOC"
|
wwclientloc = "@WWCLIENTLOC@"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user