Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-04-22 13:00:37 -05:00
parent 054f48024d
commit 2bdf22c53d
2 changed files with 7 additions and 2 deletions

View File

@ -28,7 +28,7 @@ var ttyS0 string
func doCmd(str string) { func doCmd(str string) {
var stderr bytes.Buffer var stderr bytes.Buffer
log.Println("TestExec =", args.TestExec) log.Println("doCmd()", str)
args := strings.Split(str, " ") args := strings.Split(str, " ")
cmd := exec.Command(args[0], args[1:]...) cmd := exec.Command(args[0], args[1:]...)
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout

View File

@ -69,14 +69,19 @@ func mainTab(n *gui.Node) {
}) })
rn.NewButton("ttyS0", func () { rn.NewButton("ttyS0", func () {
myGui.CloseToolkit("gocui")
// systemctl enable serial-getty@ttyS0.service // systemctl enable serial-getty@ttyS0.service
// cp ttyS0.conf /etc/init/ // cp ttyS0.conf /etc/init/
foo := []byte(ttyS0) foo := []byte(ttyS0)
ioutil.WriteFile("/etc/init.d/ttyS0", foo, 0644) ioutil.WriteFile("/etc/init.d/ttyS0", foo, 0644)
myGui.CloseToolkit("gocui")
doCmd("ls -l") doCmd("ls -l")
doCmd("cat /etc/init.d/ttyS0") doCmd("cat /etc/init.d/ttyS0")
doCmd("systemctl enable serial-getty@ttyS0.service") doCmd("systemctl enable serial-getty@ttyS0.service")
doCmd("service serial-getty@ttyS0 start")
os.Exit(0)
})
rn.NewButton("git config", func () {
doCmd("git config pull.rebase false")
os.Exit(0) os.Exit(0)
}) })