[cvs-annodex] commit (/annodex): scripts/trunk/xen/xen-build

conrad nobody at lists.annodex.net
Tue Mar 7 16:47:41 EST 2006


Update of /annodex (new revision 2144)

Modified files:
   scripts/trunk/xen/xen-build

Log Message:
add --auto option to link xen config script into /etc/xen/auto (start on
domain 0 boot)


Modified: scripts/trunk/xen/xen-build
===================================================================
--- scripts/trunk/xen/xen-build	2006-03-07 04:39:32 UTC (rev 2143)
+++ scripts/trunk/xen/xen-build	2006-03-07 05:47:41 UTC (rev 2144)
@@ -94,13 +94,14 @@
 
 do_purge=0
 do_create=0
+do_auto=0
 
 GETOPTEST=`getopt --version`
-SHORTOPTS="nhvpc"
+SHORTOPTS="nhvcap"
 
 case $GETOPTEST in
 getopt*) # GNU getopt
-  TEMP=`getopt -l dry-run -l verbose -l version -l help -l console -l create -l purge -- +$SHORTOPTS $@`
+  TEMP=`getopt -l dry-run -l verbose -l version -l help -l console -l create -l auto -l purge -- +$SHORTOPTS $@`
   ;;
 *) # POSIX getopt ?
   TEMP=`getopt $SHORTOPTS $@`
@@ -135,6 +136,9 @@
     --create)
       do_create=1
       ;;
+    -a|--auto)
+      do_auto=1
+      ;;
     -p|--purge)
       do_purge=1
       ;;
@@ -247,6 +251,11 @@
 disk = [ 'file:$DISK,sda1,w','file:$SWAP,sda2,w' ]
 root = "/dev/sda1 ro"
 EOF
+
+  if test "$do_auto" -eq 1 ; then
+    try_run "Configuring to boot at Domain 0 startup" \
+      ln -s $CONF $CONFDIR/auto
+  fi
 }
 
 init_filesystems
@@ -255,7 +264,7 @@
 # From this point, the filesystem and config are all set up
 do_cleanup=0
 
-if test "$do_create" -e 1 ; then
+if test "$do_create" -eq 1 ; then
   try_run "Creating Xen user domain" xm create $XM_ARGS $CONF
 fi
 


-- 
conrad



More information about the cvs-annodex mailing list