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