more ttyS0 stuff
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9d4a97f8af
commit
0ffdcbbd18
|
@ -82,15 +82,24 @@ func mainTab(n *gui.Node) {
|
|||
myGui.CloseToolkit("gocui")
|
||||
// systemctl enable serial-getty@ttyS0.service
|
||||
// cp ttyS0.conf /etc/init/
|
||||
foo := []byte(ttyS0)
|
||||
ioutil.WriteFile("/etc/init.d/ttyS0", foo, 0644)
|
||||
doCmd("ls -l")
|
||||
doCmd("cat /etc/init.d/ttyS0")
|
||||
doCmd("systemctl enable serial-getty@ttyS0.service")
|
||||
doCmd("service serial-getty@ttyS0 start")
|
||||
grub, _ := res.ReadFile("grub.d/wit.cfg")
|
||||
ioutil.WriteFile("/etc/default/grub.d/wit.cfg", grub, 0644)
|
||||
doCmd("update-grub")
|
||||
if _, err := os.Stat("/etc/init.d/ttyS0"); err == nil {
|
||||
log.Println("serial ttyS0 is already configured")
|
||||
} else {
|
||||
foo := []byte(ttyS0)
|
||||
ioutil.WriteFile("/etc/init.d/ttyS0", foo, 0644)
|
||||
doCmd("ls -l")
|
||||
doCmd("cat /etc/init.d/ttyS0")
|
||||
doCmd("systemctl enable serial-getty@ttyS0.service")
|
||||
doCmd("service serial-getty@ttyS0 start")
|
||||
// /etc/securetty
|
||||
}
|
||||
if _, err := os.Stat("/etc/default/grub.d/wit.cfg"); err == nil {
|
||||
log.Println("Grub is already configured")
|
||||
} else {
|
||||
grub, _ := res.ReadFile("grub.d/wit.cfg")
|
||||
ioutil.WriteFile("/etc/default/grub.d/wit.cfg", grub, 0644)
|
||||
doCmd("update-grub")
|
||||
}
|
||||
os.Exit(0)
|
||||
})
|
||||
rn.NewButton("git config", func () {
|
||||
|
|
Loading…
Reference in New Issue