Skip to content
Snippets Groups Projects
Commit 1163217d authored by Vincentius Raynaldi's avatar Vincentius Raynaldi
Browse files

changed the motd file path

parent bc673d55
Branches
No related tags found
No related merge requests found
......@@ -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(),
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment