From 3508a3a926687bb6fa15130c736384495d2b877c Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 3 Oct 2011 11:43:28 -0500 Subject: [PATCH] Move PXE cache to /root/pxe --- build_pxe_boot.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/build_pxe_boot.sh b/build_pxe_boot.sh index 2c4cc0e9c1..9d44949f55 100755 --- a/build_pxe_boot.sh +++ b/build_pxe_boot.sh @@ -20,6 +20,7 @@ if [ "$1" = "-k" ]; then fi DEST_DIR=${1:-/tmp}/tftpboot +PXEDIR=${PXEDIR:-/root/pxe} OPWD=`pwd` PROGDIR=`dirname $0` @@ -41,23 +42,23 @@ EOF # Setup devstack boot mkdir -p $DEST_DIR/ubuntu -if [ ! -d $OPWD/pxe ]; then - mkdir -p $OPWD/pxe +if [ ! -d $PXEDIR ]; then + mkdir -p $PXEDIR fi -if [ ! -r $OPWD/pxe/vmlinuz-${KVER} ]; then +if [ ! -r $PXEDIR/vmlinuz-${KVER} ]; then sudo chmod 644 /boot/vmlinuz-${KVER} if [ ! -r /boot/vmlinuz-${KVER} ]; then echo "No kernel found" else - cp -p /boot/vmlinuz-${KVER} $OPWD/pxe + cp -p /boot/vmlinuz-${KVER} $PXEDIR fi fi -cp -p $OPWD/pxe/vmlinuz-${KVER} $DEST_DIR/ubuntu -if [ ! -r $OPWD/pxe/stack-initrd.gz ]; then - cd $OPWD - sudo $PROGDIR/build_pxe_ramdisk.sh $OPWD/pxe/stack-initrd.gz +cp -p $PXEDIR/vmlinuz-${KVER} $DEST_DIR/ubuntu +if [ ! -r $PXEDIR/stack-initrd.gz ]; then + cd $PXEDIR + sudo $PROGDIR/build_pxe_ramdisk.sh $PXEDIR/stack-initrd.gz fi -cp -p $OPWD/pxe/stack-initrd.gz $DEST_DIR/ubuntu +cp -p $PXEDIR/stack-initrd.gz $DEST_DIR/ubuntu cat >>$DEFAULT <>$DEFAULT <