Update for LSB compliance

Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
This commit is contained in:
jcsiadal
2022-03-09 07:32:02 +00:00
parent 3ad6c49a3e
commit 8827937a9d
5 changed files with 19 additions and 18 deletions

View File

@@ -63,7 +63,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
return errors.New("found pidfile " + PIDFile + " not starting")
}
if os.Args[0] == path.Join(buildconfig.WWCLIENTLOC(), "wwclient") {
if os.Args[0] == path.Join(buildconfig.WWCLIENTDIR(), "wwclient") {
err := os.Chdir("/")
if err != nil {
wwlog.Printf(wwlog.ERROR, "failed to change dir: %s", err)
@@ -75,7 +75,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
} else {
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("For full functionality call with: %s\n", path.Join(buildconfig.WWCLIENTLOC(), "wwclient"))
fmt.Printf("For full functionality call with: %s\n", path.Join(buildconfig.WWCLIENTDIR(), "wwclient"))
err := os.MkdirAll("/warewulf/wwclient-test", 0755)
if err != nil {
wwlog.Printf(wwlog.ERROR, "failed to create dir: %s", err)