Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!rutgers!ucsd!ucbvax!pasteur!dorothy.Berkeley.EDU!c9c-aa From: c9c-aa@dorothy.Berkeley.EDU (Brad Post) Newsgroups: comp.sys.next Subject: Optical Disk Keywords: Here is a program to help Message-ID: <11345@pasteur.Berkeley.EDU> Date: 22 Mar 89 21:45:50 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: c9c-aa@dorothy.Berkeley.EDU (Brad Post) Organization: University of California, Berkeley Lines: 72 I remember a while back, that someone wanted a quick way to 'hot' mount optical disks. Well I wrote a program to do this, but I just now remembered that some- one else was interested. It's quite self explanitory. I can't remember where the anonymous ftp site is, so could someone either tell me or put this there. Thanks. ---------------------------------------------------------------------- /* Optical disk mounting program, by Brad Post, University of CA, Berkeley. Notes: Makes sure root owns this program, and chmod it 4755, this allows anyone else to run it. In the system call where there are [ ], you should put the location of where you want the disk to be accessible, I made it /MyDisk/Homes/optical for convience. Remember to make the dir where the disk is rwx to all. Also if you haven't done so already, before running the program, do: newfs -v /dev/od0a omd-1-all Then run the program normally, use the -s command to get help. */ #include main(argc, argv) int argc; char **argv; { void help(); int i; char **last = &argv[argc-1]; while (++argv <= last && (*argv)[0] == '-') for(i = 1; (*argv)[i] != '\0'; i++) switch((*argv)[i]) { case 'e': system("/etc/umount /dev/od0a"); system("/etc/disk -e /dev/rod0a"); break; /* Remember to put where the disk is mount on where the [] are and remember to remove the [] :-) */ case 'l': system("/etc/mount /dev/od0a [ ]"); break; default: help(); break; } } void help(); { printf("Usage: optical -el \n"); printf(" e = eject \n"); printf(" l = load \n"); } ---------------------------------------------------------------------- Oh yeah, just complie with normal cc. Send any questions, comments or bugs to the address below. Hope this helps anyone who might need it. Brad Post ARPA: c9c-aa@dorothy.berkeley.edu UUCP: ...ucbvax!dorothy!c9c-aa