7 # Mark Huang <mlhuang@cs.princeton.edu>
8 # Copyright (C) 2006 The Trustees of Princeton University
13 # Source function library and configuration
14 . /etc/plc.d/functions
15 . /etc/planetlab/plc_config
22 if [ "$PLC_BOOT_ENABLED" != "1" -a \
23 "$PLC_WWW_ENABLED" != "1" ] ; then
27 MESSAGE=$"Rebuilding Boot CD"
30 ########## legacy myplcs - temporary code
31 [ -f /etc/planetlab/nodefamily ] || { mkdir -p /etc/planetlab ; echo "planetlab-i386" > /etc/planetlab/nodefamily ; }
34 # get the default nodefamily
35 def_nodefamily=$(cat /etc/planetlab/nodefamily)
37 ########## legacy myplcs - temporary code
38 [ -d /usr/share/bootcd ] && mv /usr/share/bootcd /usr/share/bootcd-${def_nodefamily}
39 [ -d /var/www/html/download ] && mv /var/www/html/download /var/www/html/download-${def_nodefamily}
43 # Customize the Boot CD : run build.sh on all available bootcd's
45 for bootcd in /usr/share/bootcd-* ; do
46 name=$(basename $bootcd)
47 nodefamily=$(echo $name | sed -e s,bootcd-,,)
48 download=/var/www/html/download-${nodefamily}
49 [ -d ${download} ] || mkdir -p ${download}
52 ${bootcd}/build.sh ${PLC_BUILD_ALL_BOOTCDS:+-a}
56 # the default: create symlinks to the actual locations
57 if [ "${nodefamily}" == "${def_nodefamily}" ] ; then
58 rm -rf /var/www/html/download
59 ln -s /var/www/html/download-${nodefamily} /var/www/html/download
60 rm -rf /usr/share/bootcd
61 ln -s /usr/share/bootcd-${nodefamily} /usr/share/bootcd