From dd75a4a08e4225997e4d24386a2749fd3109e578 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 22 Apr 2008 15:49:24 +0000 Subject: [PATCH] multi-module change - first step towards multi-bootcd's myplc packaging of bootcd has changed, now goes into /usr/share/bootcd- a symlink /usr/share/bootcd should get created also /var/www/html/download moves to - with a convenience symlink created 2nd step (remains to do): add option(s) to GetBootMedium to leverage this --- plc.d/bootcd | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/plc.d/bootcd b/plc.d/bootcd index 1faf045..78643f0 100755 --- a/plc.d/bootcd +++ b/plc.d/bootcd @@ -27,11 +27,40 @@ case "$1" in MESSAGE=$"Rebuilding Boot CD" dialog "$MESSAGE" - # Customize the Boot CD - pushd /var/www/html/download - /usr/share/bootcd/build.sh ${PLC_BUILD_ALL_BOOTCDS:+-a} - check - popd + ########## legacy myplcs - temporary code + [ -f /etc/planetlab/nodefamily ] || { mkdir -p /etc/planetlab ; echo "planetlab-i386" > /etc/planetlab/nodefamily ; } + ########## end + + # get the default nodefamily + def_nodefamily=$(cat /etc/planetlab/nodefamily) + + ########## legacy myplcs - temporary code + [ -d /usr/share/bootcd ] && mv /usr/share/bootcd /usr/share/bootcd-${def_nodefamily} + [ -d /var/www/html/download ] && mv /var/www/html/download /var/www/html/download-${def_nodefamily} + ########## end + + + # Customize the Boot CD : run build.sh on all available bootcd's + shopt -s nullglob + for bootcd in /usr/share/bootcd-* ; do + name=$(basename $bootcd) + nodefamily=$(echo $name | sed -e s,bootcd-,,) + download=/var/www/html/download-${nodefamily} + [ -d ${download} ] || mkdir -p ${download} + + pushd ${download} + ${bootcd}/build.sh ${PLC_BUILD_ALL_BOOTCDS:+-a} + check + popd + + # the default: create symlinks to the actual locations + if [ "${nodefamily}" == "${def_nodefamily}" ] ; then + rm -rf /var/www/html/download + ln -s /var/www/html/download-${nodefamily} /var/www/html/download + rm -rf /usr/share/bootcd + ln -s /usr/share/bootcd-${nodefamily} /usr/share/bootcd + fi + done result "$MESSAGE" ;; -- 2.47.0