#!/bin/ash
#
#
#
 clear
 echo ""
 echo " Welcome to 4MLinux Backup Scripts!"
 echo ""
 echo " Where do you wish to copy your files to?"
 echo " 1) Removable USB disk."
 echo " 2) Remote server."
 if [ -e /usr/bin/cdw ]; then
   echo " 3) Optical disk (CD or DVD)."
   read -p " Your choice (1,2,3)?: " CHOICE
   else
   read -p " Your choice (1,2)?: " CHOICE
 fi
 CHOICE=X$CHOICE
 echo ""
 if [ $CHOICE = X1 ]; then
   echo -n  " Insert your removable disk and press ENTER..."
   read
   clear
   for i in 10 9 8 7 6 5 4 3 2 1; do
     clear
     echo -n " Please wait $i seconds..."
     sleep 1
   done
   mountall
   mc /mnt /media/disk
   exit
 fi
 if [ $CHOICE = X3 ]; then
   if [ -e /usr/bin/cdw ]; then
     cdw
     exit
   fi
 fi
 if [ $CHOICE = X2 ]; then
   echo /mnt > /tmp/local
   ftp-menu
   else
   if [ -e /usr/bin/cdw ]; then
     echo " Error: you must choose 1, 2, or 3."
     else
     echo " Error: your choice is neither 1 nor 2."
   fi
 fi
 if [ -e /tmp/.X0-lock ]; then
   read
 fi