blob: c0ef7929bd3d73fe27a4b4a70420094747ed404c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--- 458/usr/sbin/xe-update-guest-attrs
+++ 466/usr/sbin/xe-update-guest-attrs
@@ -82,6 +82,20 @@
return 1
}
+# If we detect a domain change then delete our cache and force a refresh
+domid=$(xenstore-read "domid")
+cache=/var/cache/xenstore/unique-domain-id
+newval=$(xenstore-read "/local/domain/${domid}/unique-domain-id")
+if [ -e $cache ]; then
+ oldval=$(cat "$cache")
+ if [ "$oldval" != "$newval" ]; then
+ # domain changed
+ rm -rf /var/cache/xenstore
+ fi
+fi
+mkdir -p $(dirname "$cache")
+echo -n "$newval" > "$cache"
+
xenstore_rm_cached() {
key="$1"
cache=/var/cache/xenstore/$key
@@ -195,7 +209,7 @@
xenstore_write_cached "attr/PVAddons/MajorVersion" "5"
xenstore_write_cached "attr/PVAddons/MinorVersion" "5"
xenstore_write_cached "attr/PVAddons/MicroVersion" "0"
-xenstore_write_cached "attr/PVAddons/BuildVersion" "17913"
+xenstore_write_cached "attr/PVAddons/BuildVersion" "25727"
xenstore_write_cached "attr/PVAddons/Installed" "1"
# update xenstore if necc
|