Permalink
Browse files

Re-enable the generation of the CLIRT shar file. Also disable the ste…

…aling of log by the clirt.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
  • Loading branch information...
1 parent 2fd56bd commit b266aeb036a356dd992c4469480a55b5c1a58c56 @jonludlam jonludlam committed Oct 16, 2009
Showing with 55 additions and 2 deletions.
  1. +2 −0 ocaml/xe-cli/rt/OMakefile
  2. +2 −2 ocaml/xe-cli/rt/cliops.ml
  3. +36 −0 scripts/make-patch
  4. +15 −0 scripts/patch-hdr
@@ -29,4 +29,6 @@ install:
install -m 755 -o root -g root install.sh /tmp/cli-rt-domu
mkdir -p /tmp/cli-rt-domu/root
cp gtmessages.ml gtcomms.ml gtlinuxops.ml gtserver_linux.ml /tmp/cli-rt-domu/root
+ (cd $(ROOT)/scripts; ./make-patch /tmp/cli-rt-domu /tmp/cli-rt-domu-shar.sh)
+ mv /tmp/cli-rt-domu-shar.sh $(DIST)/staging/opt/xensource/debug
install -m 755 -o root -g root install-debian-pv.sh install-debian-pv-inside.sh $(DIST)/staging/opt/xensource/debug
@@ -99,9 +99,9 @@ let get_short_version (cli : Util.t_cli) =
List.hd lines
let reset_xapi_log (cli : Util.t_cli) =
- (try Sys.remove "/tmp/xapi.log" with _ -> ());
+(* (try Sys.remove "/tmp/xapi.log" with _ -> ());
ignore (expect_success (fun () -> cli "log-set-output" ["output","nil"]));
- ignore (expect_success (fun () -> cli "log-set-output" ["output","file:/tmp/xapi.log"]))
+ ignore (expect_success (fun () -> cli "log-set-output" ["output","file:/tmp/xapi.log"]))*) ()
let get_xapi_log (cli : Util.t_cli) =
let ic = open_in "/tmp/xapi.log" in
View
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Makes a patch by shar'ing up a directory (given as an argument) and prefixing
+# patch-hdr to an output file (given as the second argument)
+
+PATCHDIR=$1
+OUTPUT=$2
+INSTALL=$PATCHDIR/install.sh
+
+usage(){
+ echo Usage:
+ echo "$0 <dirname> <output>-- where <dirname> contains an install.sh file"
+ exit 1
+}
+
+if [ -z "$OUTPUT" ]
+then
+ echo Need an output filename
+ usage
+fi
+
+if [ -e $INSTALL ]
+then
+
+ SHARNAME=patch.$$
+ trap 'rm -f $SHARNAME; exit 1' HUP INT QUIT TERM
+
+ echo Writing to $SHARNAME
+ (cd $PATCHDIR; shar *) > $SHARNAME
+ cat patch-hdr $SHARNAME > $OUTPUT
+ rm $SHARNAME
+
+ echo Done
+else
+ usage
+fi
View
@@ -0,0 +1,15 @@
+#!/bin/sh
+PATH=/usr/bin:/bin
+umask 022
+tail_args="-n "
+echo "Unpacking..."
+outname=install.sfx.$$
+trap 'rm -f $outname; exit 1' HUP INT QUIT TERM
+tail ${tail_args}+16 $0 > $outname
+chmod +x $outname
+echo "Extracting..."
+./$outname
+echo "Executing..."
+./install.sh
+rm -f $outname
+# Line 15 -- data follows!

0 comments on commit b266aeb

Please sign in to comment.