home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / 3b1 / 4110 < prev    next >
Encoding:
Text File  |  1992-12-24  |  1.2 KB  |  35 lines

  1. Newsgroups: comp.sys.3b1
  2. Path: sparky!uunet!nwnexus!seanews!eskimo!ape
  3. From: ape@eskimo.com (Mark Newland)
  4. Subject: Shell program problem
  5. Message-ID: <1992Dec24.102302.19922@eskimo.com>
  6. Organization: -> ESKIMO NORTH (206) For-Ever <-
  7. Date: Thu, 24 Dec 1992 10:23:02 GMT
  8. Lines: 25
  9.  
  10.  
  11. I love my 3b1 except for the fact thats it's too small.  I only have 1Meg RAM
  12. and a puny 20Meg HD.  I know, I know, buy a bigger drive!  Until then I have
  13. most of my programs on floppys.  I am willing to run off floppy but there is
  14. the hassle of mounting and unmounting the drive, etc.  I figured I could write
  15. a shell program to handle this for me.  As a test I wrote the following shell
  16. script.  Everything works just fine except that after the program is completed,
  17. it does not unmount the floppy.  Is there a way I can have the floppy unmount
  18. itself after the program is ran?   Should I look closer at the fork command?
  19. I suspect that the termination of the $PROGRAM also terminates my shell
  20. program itself.
  21.  
  22.  
  23. ----------------------
  24. foo.sh
  25. ----------------------
  26. DISK_LABEL = bar(1)
  27. PROGRAM = foo
  28.  
  29. message -i "Enter $DISK_LABEL disk\n\nPress ENTER to continue" 
  30.  
  31. mount /dev/fp021 /mnt
  32. /mnt/$PROGRAM
  33. umount /dev/fp021
  34.  
  35.