diff options
| author | Jeff Carr <[email protected]> | 2025-10-03 04:03:22 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-03 04:03:22 -0500 |
| commit | 13dccc522038f8b4303972e3e78b7867193fdbeb (patch) | |
| tree | 7a26c908be65a866eefbe0b5c5682ea8af82403b /doRdate.go | |
| parent | 3e8bef724c2173c4ecf749e0c03d9131abd094bb (diff) | |
rdate
Diffstat (limited to 'doRdate.go')
| -rw-r--r-- | doRdate.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -3,9 +3,19 @@ package main +import "go.wit.com/lib/fhelp" + func doRdate() { checkSuperuser() + if _, err := fhelp.CheckCmd("rdate"); err != nil { + exitOnError([]string{"apt", "install", "rdate"}) + } + + if _, err := fhelp.CheckCmd("hwclock"); err != nil { + exitOnError([]string{"apt", "install", "util-linux-extra"}) + } + exitOnError([]string{"rdate", "rdate.grid.wit.com"}) exitOnError([]string{"hwclock", "-w"}) } |
