diff options
Diffstat (limited to 'doLinux.go')
| -rw-r--r-- | doLinux.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -20,7 +20,12 @@ func doUptime() { exitOnError([]string{"journalctl", "-b", "-1"}) // the last boot log } -func doRdate() { +func doRdate() (string, error) { + if !debian.AreRoot() { + exitOnError([]string{"rdate", "-p", "rdate.grid.wit.com"}) + exitOnError([]string{"date"}) + return "rdate ok", nil + } checkSuperuser() if _, err := fhelp.CheckCmd("rdate"); err != nil { @@ -33,4 +38,5 @@ func doRdate() { exitOnError([]string{"rdate", "rdate.grid.wit.com"}) exitOnError([]string{"hwclock", "-w"}) + return "", nil } |
