Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (33 sloc) 1.087 kb
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
1 #!/bin/sh
2 #
3 # Copyright (c) Citrix Systems 2008. All rights reserved.
4 #
5
6 # Runs on the George master when performing a rolling upgrade from Orlando
7
8 set -e
9
13b8348 @jonludlam Move everything over to using Fhs.ml / @ substitution
jonludlam authored
10 . @INVENTORY@
11 XE="@BINDIR@/xe"
f77e728 Initial import of hg.uk.xensource.com/carbon/trunk/api.hg c/s 9691:9a256...
Xen hg user authored
12
13 # Clean all unreferenced patches out of the db now that the upgrade is complete.
14 # When upgrading to 5.0, this should clean out all 4.1 patches at the end.
15 function clean_patches {
16 IFS=,
17 for pool_patch in $(xe patch-list --minimal params=uuid hosts=) ; do
18 xe patch-destroy uuid=${pool_patch}
19 done
20 }
21
22 case "$1" in
23 start)
24
25 ;;
26 stop)
27 for i in $($XE sr-list other-config:xenserver_tools_sr=true params=uuid --minimal | sed 's/,/ /g'); do
28 echo Renaming $i
29 $XE sr-param-set uuid=$i name-label="XenServer Tools" name-description="XenServer Tools ISOs"
30 echo Forgetting all missing VDIs
31 # Note any suspended guest using one of these VDIs will be confused
32 for j in $($XE vdi-list sr-uuid=$i missing=true params=uuid --minimal | sed 's/,/ /g'); do
33 $XE vdi-forget uuid=$j
34 done
35 done
36
37 # Clean up patches
38 clean_patches
39 ;;
40 esac
Something went wrong with that request. Please try again.