home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / ROOTDSKS.12 / UMSDOS12 / usr / lib / setup / INSdir < prev    next >
Encoding:
Text File  |  1994-02-13  |  1.2 KB  |  43 lines

  1. #!/bin/sh
  2. while [ 0 ]; do
  3. rm -f /tmp/SeTDS /tmp/SeTmount
  4. cat << EOF > /tmp/tmpmsg
  5.  
  6. We will install from the same DOS partition which you have
  7. already configured as the target Linux partition. In which
  8. directory on this partition can the Slackware sources (and
  9. the subdirectories for each disk to be installed) be
  10. found?
  11.  
  12. Which directory would you like to install from?
  13. EOF
  14. dialog --title "INSTALL FROM THE CURRENT FILESYSTEM" \
  15.  --inputbox "`cat /tmp/tmpmsg`" 19 67 2> /tmp/sourcedir
  16. if [ $? = 1 -o $? = 255 ]; then
  17.  rm -f /tmp/sourcedir /tmp/tmpmsg
  18.  exit
  19. fi
  20. SOURCEDIR="/mnt/`cat /tmp/sourcedir`"
  21. rm -f /tmp/sourcedir /tmp/tmpmsg
  22. rm -f /var/adm/mount 2> /dev/null
  23. rmdir /var/adm/mount 2> /dev/null
  24. ln -sf $SOURCEDIR /var/adm/mount
  25. if [ -d $SOURCEDIR ]; then
  26.  echo "/var/adm/mount" > /tmp/SeTDS
  27.  echo "-source_mounted" > /tmp/SeTmount
  28.  echo "/dev/null" > /tmp/SeTsource
  29.  exit
  30. else
  31.  cat << EOF > /tmp/tmpmsg
  32.  
  33. Sorry - the directory you specified is not valid. Please 
  34. check the directory and try again.
  35.  
  36. (Directory given: $SOURCEDIR)
  37.  
  38. EOF
  39.  dialog --title "INVALID DIRECTORY ENTERED" --msgbox "`cat /tmp/tmpmsg`" 10 65
  40.  rm -f /tmp/SeTDS /tmp/SeTmount /tmp/sourcedir /tmp/tmpmsg
  41. fi
  42. done;
  43.