f23: patch for locating kernel to embed on bootcd
[bootcd.git] / plc.d / bootcd-kernel
index 5125ada..e7526fa 100755 (executable)
@@ -1,9 +1,11 @@
 #!/bin/bash
+# $Id$
+# $URL$
 #
-# priority: 0999
+# priority: 999
 #
-# $Id$
 # Build BootCD variants with kernels specified in /etc/planetlab/bootcd-variants
+#
 
 # Source function library and configuration
 . /etc/plc.d/functions
@@ -21,23 +23,20 @@ case "$1" in
                pushd $i
                basearch=$(echo $i | awk -F- '{ print $NF }')
                arch=$(echo $basearch | sed 's/i386/i686/')
-               for j in /etc/planetlab/bootcd-variants/*; do
+               for j in $(ls -d /etc/planetlab/bootcd-variants/* 2> /dev/null); do
                        name="${j##*/}"
                        url=$(cat "$j" | sed "s!@BASEARCH@!$basearch!g;s!@ARCH@!$arch!g")
                        if test -d "$name"; then
                                test build/isofs/bootcd.img -nt "$name/isofs/bootcd.img" || continue
                        elif test "$name" = default; then
                                # Not ideal, but...
-                               grep -q support@planet-lab.org build/isofs/kernel || continue
+                               grep -q support@ build/isofs/kernel || continue
                        fi
                        if test "$url" != $(echo "$url" | sed s#[:/]##); then
                                ./kvariant.sh "$name" "$url"
                        else
                                dir=$(mktemp -d -p /var/tmp)
-                               yumdownloader --disablerepo='*' \
-                                       --enablerepo=base \
-                                       --enablerepo=updates \
-                                       --destdir "$dir" "$url"
+                               yumdownloader --destdir "$dir" "$url"
                                ./kvariant.sh "$name" "$dir"/"$url"*
                                rm -fr "$dir"
                        fi