#!/bin/bash
cd /usr/src/
KNAME=`uname -a | cut -d " " -f 3`
echo The kernel backup name will be /usr/src/Linux-$KNAME.tar.gz > /tmp/tmpmsg
dialog --title "CREATING A BACKUP OF THE CURRENT KERNEL" \
       --yesno "`cat /tmp/tmpmsg`" 5 70
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/tmpmsg
  cd /tmp/cyc/;INST_CYCLOM
else 
  dialog --title "BACKING UP KERNEL" \
         --msgbox "Press ENTER and be patient ... !" 5 40
  tar -czf Linux-$KNAME.tar.gz ./linux 
  if [ $? != 0 ]; then
    dialog --title "BACKING UP KERNEL" --msgbox "Backup failure !!!!" 5 30
    else
      dialog --title "BACKING UP KERNEL" --msgbox "Backup sucessful" 5 30
  fi    
fi
cd /tmp/cyc/;INST_CYCLOM


