diff --git a/examples/example01/cmd/start.go b/examples/example01/cmd/start.go index 88d5f00f8ca2b578636044f152abeff62cd67855..359503f7445e0608d99f1e409b67cb9f4e5e072a 100644 --- a/examples/example01/cmd/start.go +++ b/examples/example01/cmd/start.go @@ -87,6 +87,7 @@ var startCmd = &cobra.Command{ // The registered path handlers sorted by priority. If specific // handlers should be able to process their workload before others, // then they should be placed in the front of the slice. + fmt.Println("before handlers") handlers := []handler.PathHandler{ interfaces.NewInterfacesHandler(), networkinstances.NewNetworkInstanceHandler(), diff --git a/examples/example01/osclient/additions/system_linux.go b/examples/example01/osclient/additions/system_linux.go index 5d348023ef4fa87fe3e8ba198c90d8fecc93c210..eab5694e5df0b2bff9e2ee56bee3a5f6ecfe58f0 100644 --- a/examples/example01/osclient/additions/system_linux.go +++ b/examples/example01/osclient/additions/system_linux.go @@ -3,6 +3,7 @@ package additions import ( "bufio" "os" + "os/exec" "strings" "syscall" @@ -112,7 +113,9 @@ func (sys *system) GetSoftwareVersion() (string, error) { } func (sys *system) GetMotd() (string, error) { - motdMessage, err := os.ReadFile("/etc/motd") + cmd := exec.Command("run-parts", "/etc/update-motd.d/") + motdMessage, err := cmd.Output() + // motdMessage, err := os.ReadFile("/etc/motd") if err != nil { return "", err }