From 6c339073c1d3c69ad6c1eaa6a03f65864d6ca28c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 26 Jan 2010 13:57:24 +0000 Subject: [PATCH] 3-fold nodefamily now has fcdistro as well --- bootcd.spec | 2 +- plc.d/bootcd | 29 +++++++---------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/bootcd.spec b/bootcd.spec index 8c2b2cf..c8a4f81 100644 --- a/bootcd.spec +++ b/bootcd.spec @@ -3,7 +3,7 @@ # %define url $URL$ -%define nodefamily %{pldistro}-%{_arch} +%define nodefamily %{pldistro}-%{distroname}-%{_arch} %define name bootcd-%{nodefamily} %define version 5.0 diff --git a/plc.d/bootcd b/plc.d/bootcd index e628dd7..2a3469b 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 @@ -27,23 +28,9 @@ case "$1" in MESSAGE=$"Rebuilding Boot CD" dialog "$MESSAGE" - ########## 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-,,) @@ -55,13 +42,11 @@ case "$1" in 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" -- 2.43.0