7 # Build BootCD variants with kernels specified in /etc/planetlab/bootcd-variants
10 # Source function library and configuration
11 . /etc/plc.d/functions
18 MESSAGE=$"Creating BootCD variants"
22 for i in /usr/share/bootcd-*; do
24 basearch=$(echo $i | awk -F- '{ print $NF }')
25 arch=$(echo $basearch | sed 's/i386/i686/')
26 for j in $(ls -d /etc/planetlab/bootcd-variants/* 2> /dev/null); do
28 url=$(cat "$j" | sed "s!@BASEARCH@!$basearch!g;s!@ARCH@!$arch!g")
29 if test -d "$name"; then
30 test build/isofs/bootcd.img -nt "$name/isofs/bootcd.img" || continue
31 elif test "$name" = default; then
33 grep -q support@ build/isofs/kernel || continue
35 if test "$url" != $(echo "$url" | sed s#[:/]##); then
36 ./kvariant.sh "$name" "$url"
38 dir=$(mktemp -d -p /var/tmp)
39 yumdownloader --destdir "$dir" "$url"
40 ./kvariant.sh "$name" "$dir"/"$url"*
43 if test "$name" = default; then