home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / vmsnet / networks / tcpip / multinet / 2418 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.9 KB  |  49 lines

  1. X-Gateway-Source-Info: INTERNET
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!news.service.uci.edu!unogate!mvb.saic.com!tgv.com!info-multinet
  3. Date: 20 NOV 92 21:05:54 GMT
  4. Newsgroups: vmsnet.networks.tcp-ip.multinet
  5. X-Return-path: <info-multinet-relay@TGV.COM>
  6. X-RFC822-From:    PACK@UARS.ACD.UCAR.EDU (Daniel Packman (303) 497-1427)
  7. From: PACK@UARS.ACD.UCAR.EDU
  8. Subject: RMTALLOC problem with aix solved
  9. X-Vmsmail-To: SMTP%"info-multinet@TGV.COM",SMTP%"busma@tgv.com"
  10. Organization: The INFO-MULTINET Community
  11. Message-ID: <36A00FB320NOV92210554@TGV.COM>
  12. Nntp-Posting-Host: Mvb.Saic.Com
  13. Lines: 34
  14.  
  15. Some time ago I mentioned a problem with the rmt client when
  16. used on a tape on a remote IBM RS6000/AIX machine.  It turns out
  17. that AIX has a non-standard idea of ioctl numbers.  The following
  18. perl script, when installed on the AIX machine in the place of the
  19. symbolic link "/etc/rmt", intercepts and translates the ioctl numbers
  20. to the local values.  RMTALLOC/MOUNT/COPY all work now.
  21.  
  22.  
  23. #!/bin/perl
  24. # Wrapper to convert input rmt requests to
  25. # AIX 3.2 ioctl numbers.  We pass on all commands we don't understand
  26. # I0 MTWEOF -> I10  STWEOF write and end-of-file record
  27. # I1 MTFSF  -> I11  STFSF  forward space file
  28. # I2 MTBSF  -> I12  STRSF  reverse space file
  29. # I3 MTFSR  -> I13  STFSR  forward space record
  30. # I4 MTBSR  -> I14  STRSR  reverse space record
  31. # I5 MTREW  -> I6   STREW  rewind
  32. # I6 MTOFFL -> I5   STOFFL rewind and unload tape
  33. # I7 MTNOP  -> I0   (no-op? should ignore following count)
  34. # I8 MTRETEN-> I8   STRETEN retension tape, leave at load point
  35. # I9 MTERASE-> I7   STERASE erase tape, leave at load point
  36. #I10 MTEOM (position to end of media ... no ibm equivalent?)
  37. #I11 MTNBSF  (backward space file to BOF ... no ibm equivalent?)
  38. @iocs = (10,11,12,13,14,6,5,0,8,7);
  39. open(RMT,"|/usr/sbin/rmt") || die "Can't open pipe to rmt\n";
  40. select(RMT);
  41. $| = 1;
  42. while (<STDIN>) {
  43.   s/(^I)(\d$)/I$iocs[$2]/;
  44.   exit 0 if $_ =~ /^[Qq]/;
  45.   print RMT $_ ; }
  46. exit 0;
  47.  
  48. 
  49.