summaryrefslogtreecommitdiff
path: root/xe-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'xe-daemon')
-rw-r--r--xe-daemon/xe-daemon.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/xe-daemon/xe-daemon.go b/xe-daemon/xe-daemon.go
index 839e454..17c4bfd 100644
--- a/xe-daemon/xe-daemon.go
+++ b/xe-daemon/xe-daemon.go
@@ -3,6 +3,7 @@ package main
import (
guestmetric "../guestmetric"
syslog "../syslog"
+ system "../system"
xenstoreclient "../xenstoreclient"
"flag"
"fmt"
@@ -52,6 +53,9 @@ func main() {
exitChannel := make(chan os.Signal, 1)
signal.Notify(exitChannel, syscall.SIGTERM, syscall.SIGINT)
+ resumedChannel := make(chan int)
+ go system.NotifyResumed(resumedChannel)
+
xs, err := xenstoreclient.NewCachedXenstore(0)
if err != nil {
message := fmt.Sprintf("NewCachedXenstore error: %v\n", err)
@@ -135,6 +139,10 @@ func main() {
}
return
+ case <-resumedChannel:
+ logger.Printf("Trigger refresh after system resume\n")
+ continue
+
case <-time.After(time.Duration(*sleepInterval) * time.Second):
continue
}