[Debian-NP-Commits] r283 - people/vagrant/simple-cdd

Vagrant Cascadian debian-np-devel@lists.alioth.debian.org
Sun, 28 Nov 2004 14:21:18 -0700


Author: vagrant-guest
Date: Sun Nov 28 14:21:06 2004
New Revision: 283

Added:
   people/vagrant/simple-cdd/qemu-test.conf
Modified:
   people/vagrant/simple-cdd/qemu-test
Log:
use a configuration file.  bugfix: boot to the hard-drive on initial boot.


Modified: people/vagrant/simple-cdd/qemu-test
==============================================================================
--- people/vagrant/simple-cdd/qemu-test	(original)
+++ people/vagrant/simple-cdd/qemu-test	Sun Nov 28 14:21:06 2004
@@ -7,16 +7,18 @@
 # Licensed under the terms of the GNU General Public License,
 # version 2 or any later version.
 
-. CONF.sh
+qemu_conf="./qemu-test.conf"
+if [ -r "$qemu_conf" ]; then
+  . "$qemu_conf"
+else
+  echo "ERROR: configuration file not found: $qemu_conf"
+  exit 1
+fi
 
 # set some defaults
-hd_img=$HOME/nobackup/qemu.hd.img
-cd_img=$OUT/sarge-i386-1.raw
-mem=96
-
-test "-r" qemu-test.conf && . qemu-test.conf
-
-qemu_opts="-nographic -user-net"
+test -z "$hd_img" && hd_img="$simple_cdd_dir/qemu-test.hd.img"
+test -z "$cd_img" && cd_img="$OUT/sarge-i386-1.raw"
+test -z "$qemu_opts" && qemu_opts="-nographic -user-net"
 
 if [ -n "$mem" ]; then
   qemu_opts="$qemu_opts -m $mem"
@@ -45,4 +47,4 @@
 reset
 
 # boot to the installed system
-qemu $qemu_opts -boot d 
+qemu $qemu_opts -boot c 

Added: people/vagrant/simple-cdd/qemu-test.conf
==============================================================================
--- (empty file)
+++ people/vagrant/simple-cdd/qemu-test.conf	Sun Nov 28 14:21:06 2004
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# include default building options- do not uncomment
+. CONF.sh
+
+# location of the hard disk image (used with qemu's -hda option)
+hd_img="$simple_cdd_dir/qemu-test.hd.img"
+
+# location of the CD image (used with qemu's -cdrom option)
+cd_img="$OUT/sarge-i386-1.raw"
+
+# memory available within qemu, in MB
+mem=96
+
+# additional options that get passed to qemu
+qemu_opts="-nographic -user-net"