From 783cc7774f6888a430a05749ce30908e621c52fd Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Thu, 29 Sep 2011 18:43:44 -0500 Subject: [PATCH] Fix kernel version issue --- build_pxe_boot.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build_pxe_boot.sh b/build_pxe_boot.sh index c5ef276..6d264bd 100755 --- a/build_pxe_boot.sh +++ b/build_pxe_boot.sh @@ -44,16 +44,17 @@ mkdir -p $DEST_DIR/ubuntu if [ ! -d $OPWD/pxe ]; then mkdir -p $OPWD/pxe fi -if [ ! -r $OPWD/pxe/vmlinuz-${KVER}-generic ]; then - if [ ! -r /boot/vmlinuz-${KVER}-generic ]; then +if [ ! -r $OPWD/pxe/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}-generic $OPWD/pxe + cp -p /boot/vmlinuz-${KVER} $OPWD/pxe fi fi -cp -p $OPWD/pxe/vmlinuz-${KVER}-generic $DEST_DIR/ubuntu +cp -p $OPWD/pxe/vmlinuz-${KVER} $DEST_DIR/ubuntu if [ ! -r $OPWD/pxe/stack-initrd.gz ]; then - $PROGDIR/build_pxe_ramdisk.sh $OPWD/pxe/stack-initrd.gz + sudo $PROGDIR/build_pxe_ramdisk.sh $OPWD/pxe/stack-initrd.gz fi cp -p $OPWD/pxe/stack-initrd.gz $DEST_DIR/ubuntu cat >>$DEFAULT <