[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] Xendomains always broken for me, nobody else?
Hi All, Everytime I upgrade to a new version of Xen (just did 4.2.1 this weekend) I find the xendomains script completely unusable. I use xl exclusively and the behaviour is slightly different to what the script appears to be expecting. Am I the only one that has this problem? I have an Ubuntu 12.04 based Xen server and a Scientific Linux
6.3 based server and both suffer the same problem. I am no bash guru, so apologies if there are better/cleaner ways. I did submit it as a patch on the devel list but it got ignored plus I have no idea if it works for xm or not. Thanks for reading, Ian. diff: --- xendomains.421 2012-12-17 15:00:34.000000000 +0000 +++ xendomains 2013-01-06 11:14:44.622409914 +0000 @@ -27,11 +27,13 @@ # boots / shuts down. ### END INIT INFO +HEADCOMP="LinuxGuestRecord" CMD=xm $CMD list &> /dev/null if test $? -ne 0 then CMD=xl + HEADCOMP="Xen saved domain" fi $CMD list &> /dev/null @@ -202,10 +204,10 @@ done } -LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":' +LIST_GREP='((domain$\|(domid\|(name\|^{$\|"name":\|"domid":' parseln() { - if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then + if [[ "$1" = '(domain' ]] || [[ "$1" = "{" ]]; then name=;id= elif [[ "$1" =~ '(name' ]]; then name=$(echo $1 | sed -e 's/^.*(name \(.*\))$/\1/') @@ -255,7 +257,7 @@ for dom in $XENDOMAINS_SAVE/*; do if [ -f $dom ] ; then HEADER=`head -c 16 $dom | head -n 1 2> /dev/null` - if [ $HEADER = "LinuxGuestRecord" ]; then + if [ "$HEADER" = "$HEADCOMP" ]; then echo -n " ${dom##*/}" XMR=`$CMD restore $dom 2>&1 1>/dev/null` #$CMD restore $dom _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |