summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2012-12-06 00:17:54 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-06 22:53:40 +0100
commitd1a60839f80849b4c0a68fb891a05eb9a17b9eb6 (patch)
tree207e2003f6365e72fe35aae80133efee1b21d685
parente62ddc30580852399401f15c7149f10c1b000117 (diff)
downloadjenkins.debian.net-d1a60839f80849b4c0a68fb891a05eb9a17b9eb6.tar.xz
Move preseed display to separate function show_preseed() to avoid code
duplication.
-rwxr-xr-xbin/cd_tester.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh
index 0e19b1ac..1c915119 100755
--- a/bin/cd_tester.sh
+++ b/bin/cd_tester.sh
@@ -78,6 +78,13 @@ cleanup_all() {
sudo umount $IMAGE_MNT
}
+show_preseed() {
+ url="$1"
+ echo "Preseeding from $url:"
+ echo
+ curl -s "$url" | grep -v ^# | grep -v "^$"
+}
+
bootstrap() {
cd $WORKSPACE
echo "Creating raw disk image with ${DISKSIZE_IN_GB} GiB now."
@@ -85,26 +92,19 @@ bootstrap() {
echo "Doing cd tests for $NAME now."
case $NAME in
wheezy-debian-edu-workstation)
- # FIXME: this obviously needs to be moved to a function
- echo "Preseeding used:"
- echo
- curl -s http://localhost/userContent/${NAME}-preseed.cfg | grep -v ^# |grep -v "^$"
+ show_preseed http://localhost/userContent/${NAME}-preseed.cfg
echo
echo "Starting QEMU now:"
sudo qemu-system-x86_64 -cdrom $IMAGE -drive file=$NAME.raw,index=0,media=disk,cache=writeback -boot d -m $RAMSIZE -display vnc=$DISPLAY --kernel $IMAGE_MNT/install.amd/vmlinuz --append "auto=true priority=critical locale=en_US keymap=us url=http://10.0.2.2/userContent/${NAME}-preseed.cfg video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet" --initrd $IMAGE_MNT/install.amd/gtk/initrd.gz &
;;
squeeze-test-debian-edu-standalone)
- echo "Preseeding used:"
- echo
- curl -s http://localhost/userContent/${NAME}-preseed.cfg | grep -v ^# |grep -v "^$"
+ show_preseed http://localhost/userContent/${NAME}-preseed.cfg
echo
echo "Starting QEMU now:"
sudo qemu-system-x86_64 -cdrom $IMAGE -drive file=$NAME.raw,index=0,media=disk,cache=writeback -boot d -m $RAMSIZE -display vnc=$DISPLAY --kernel $IMAGE_MNT/install.amd/vmlinuz --append "auto=true priority=critical locale=en_US console-keymaps-at/keymap=us url=http://10.0.2.2/userContent/${NAME}-preseed.cfg video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet" --initrd $IMAGE_MNT/install.amd/gtk/initrd.gz &
;;
wheezy-lxde)
- echo "Preseeding used:"
- echo
- curl -s http://localhost/userContent/${NAME}-preseed.cfg | grep -v ^# |grep -v "^$"
+ show_preseed http://localhost/userContent/${NAME}-preseed.cfg
echo
echo "Starting QEMU now:"
sudo qemu-system-x86_64 -drive file=$NAME.raw,index=0,media=disk,cache=writeback -boot c -m $RAMSIZE -display vnc=$DISPLAY --kernel $KERNEL --append "auto=true priority=critical desktop=lxde locale=en_US keymap=us url=http://10.0.2.2/userContent/${NAME}-preseed.cfg video=vesa:ywrap,mtrr vga=788 --" --initrd $INITRD &