summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doDebian.go4
-rw-r--r--doRdate.go10
2 files changed, 13 insertions, 1 deletions
diff --git a/doDebian.go b/doDebian.go
index 5bdf614..10321aa 100644
--- a/doDebian.go
+++ b/doDebian.go
@@ -9,7 +9,9 @@ import (
)
func doDebian() {
- if !argv.Debian.SkipInstall {
+ if argv.Force || argv.Debian.Force || argv.Debian.SkipInstall {
+ log.Info("doDebian() skipping go install test")
+ } else {
if err := doInstall(); err != nil {
log.Info("doInstall() failed", err)
badExit(err)
diff --git a/doRdate.go b/doRdate.go
index 244b7c1..ac66119 100644
--- a/doRdate.go
+++ b/doRdate.go
@@ -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"})
}