]> gitweb.fluxo.info Git - kvm-manager.git/commitdiff
allow di-maker to build ubuntu netboot install ISOs as well
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 11 Dec 2009 03:08:18 +0000 (22:08 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 11 Dec 2009 03:08:18 +0000 (22:08 -0500)
di-maker

index c213c2b31649f29808b0a76508742ffb03d027f0..4252fb9580c27302c7e8dea64168bb9dfd5ffe96 100755 (executable)
--- a/di-maker
+++ b/di-maker
@@ -14,6 +14,7 @@ output="$1"
 
 SUITE=${SUITE:-stable}
 ARCH=${ARCH:-amd64}
+DISTRO=${DISTRO:-debian}
 
 if [ -z "$output" ] ; then
     printf "you must specify a file name for the image to be built" >&2
@@ -34,7 +35,16 @@ cleanup() {
 
 trap cleanup EXIT
 
-( cd "$WORKDIR" && wget http://ftp.nl.debian.org/debian/dists/"$SUITE"/main/installer-"$ARCH"/current/images/netboot/debian-installer/"$ARCH"/{linux,initrd.gz} )
+case "$DISTRO" in
+    debian)
+        BASEPATH="http://ftp.nl.debian.org/debian/dists/$SUITE/main/installer-$ARCH/current/images/netboot/debian-installer/$ARCH"
+        ;;
+    ubuntu)
+        BASEPATH="http://archive.ubuntu.com/ubuntu/dists/$SUITE/main/installer-$ARCH/current/images/netboot/ubuntu-installer/$ARCH"
+        ;;
+esac
+
+( cd "$WORKDIR" && wget "$BASEPATH"/{linux,initrd.gz} )
 
 mkdir -p "$WORKDIR/boot/grub"