X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fbootcd;h=c563265ec14aea9dea1f1a2cb94eb4f5900bb372;hb=4bd97266e53cc34f98a57a18756152d1610a7961;hp=e628dd7fb6ab3692efdf4156d05e010a0f62a689;hpb=2f99d36ba036257227488b385e093c3067f19b0a;p=bootcd.git diff --git a/plc.d/bootcd b/plc.d/bootcd index e628dd7..c563265 100755 --- a/plc.d/bootcd +++ b/plc.d/bootcd @@ -8,6 +8,7 @@ # Copyright (C) 2006 The Trustees of Princeton University # # $Id$ +# $URL$ # # Source function library and configuration @@ -24,26 +25,11 @@ case "$1" in exit 0 fi - MESSAGE=$"Rebuilding Boot CD" - dialog "$MESSAGE" + dialog $"Rebuilding Boot CD" - ########## legacy myplcs - temporary code - # create /etc/planetlab/nodefamily if missing - [ -f /etc/planetlab/nodefamily ] || { mkdir -p /etc/planetlab ; echo "planetlab-i386" > /etc/planetlab/nodefamily ; } - # move if plain directories - for legacydir in /usr/share/bootcd /var/www/html/download ; do - if [ -d "${legacydir}" ] && [ ! -h ${legacydir} ] ; then - rm -rf ${legacydir}-legacy - mv -f ${legacydir} ${legacydir}-legacy - fi - done - ########## end - - # get the default nodefamily - def_nodefamily=$(cat /etc/planetlab/nodefamily) - # Customize the Boot CD : run build.sh on all available bootcd's shopt -s nullglob + # xxx nodefamily xxx - might make sense to detect sequel from older installs for bootcd in /usr/share/bootcd-* ; do name=$(basename $bootcd) nodefamily=$(echo $name | sed -e s,bootcd-,,) @@ -51,17 +37,15 @@ case "$1" in [ -d ${download} ] || mkdir -p ${download} pushd ${download} - ${bootcd}/build.sh ${PLC_BUILD_ALL_BOOTCDS:+-a} + action $"Rebuilding BootCD $name" ${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 /usr/share/bootcd - ln -s /usr/share/bootcd-${nodefamily} /usr/share/bootcd - rm -rf /var/www/html/download - ln -s /var/www/html/download-${nodefamily} /var/www/html/download - fi + done + + # just issue a warning about legacy locations + for legacy in /usr/share/bootcd /var/www/html/download ; do + [ -e $legacy ] && echo "WARNING: found legacy location $legacy -- ignored" done result "$MESSAGE"