summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon.go4
-rw-r--r--main.go7
2 files changed, 7 insertions, 4 deletions
diff --git a/daemon.go b/daemon.go
index f92907f..17c486e 100644
--- a/daemon.go
+++ b/daemon.go
@@ -7,6 +7,8 @@ import (
"fmt"
"os"
"time"
+
+ "go.wit.com/lib/debian"
)
// timeFunction takes a function as an argument and returns the execution time.
@@ -27,7 +29,7 @@ func zood() {
fmt.Println("Done!")
return
case _ = <-me.dog.C:
- s := me.machine.UpdatePackages()
+ s := debian.UpdatePackages(me.machine)
me.failcount += 1
sendMachine(s)
diff --git a/main.go b/main.go
index 353791b..9420f63 100644
--- a/main.go
+++ b/main.go
@@ -9,6 +9,7 @@ import (
"os"
"time"
+ "go.wit.com/lib/debian"
"go.wit.com/lib/gui/prep"
"go.wit.com/lib/hostname"
"go.wit.com/lib/protobuf/zoopb"
@@ -32,9 +33,9 @@ func main() {
if argv.Daemon {
// turn off timestamps for STDOUT (systemd adds them)
log.DaemonMode(true)
- me.machine, me.fullpath = zoopb.InitDaemon()
+ me.machine = debian.InitDaemon()
} else {
- me.machine, me.fullpath = zoopb.InitMachine()
+ me.machine = debian.InitMachine()
}
if argv.Status != nil {
@@ -111,7 +112,7 @@ func testURL(urlbase string, pb *zoopb.Machine) error {
return err
}
wsPB.DumpClient()
- newpb.Dump()
+ log.Infof("mem=%d cpus=%d\n", newpb.Memory, newpb.Cpus)
log.Info("got error:", err)
return err
}