[896] in OS/2_Discussion
Athena's 'add' for OS/2?
daemon@ATHENA.MIT.EDU (klund@MIT.EDU)
Sat Apr 6 18:30:59 1996
From: klund@MIT.EDU
Date: Sat, 6 Apr 96 18:30:37 -0500
To: os2partners@MIT.EDU
/* ADD.CMD v1.0 --- attaches an AFS directory and extends the PATH.
Modeled after the M.I.T. Athena "add" command that does the same.
This is an absolutely brain-dead way to do this, but I consider this
to be more of a "proof of concept" than golden code. I just wanted
to show that it could be done, without learning the API interface to
the HESIOD dll. Maybe someone else can rewrite this in C.
This program assumes that you have Chris Shabsin's Athena/2
package installed, as well as the CMU AFS for OS/2 requestor.
Okay, so what we do is lookup the argument name in Hesiod, using
HESINFO <locker> FILSYS, and then use DRVATTCH to map it to a drive
letter. We then add that drive letter to the path. Woo woo.
There isn't too much OS/2 software hanging around the /afs/athena/
cell, but you can try the following:
add os2 & os2www
add os2 & columns
add voodoo & voodoo
BUGS AND LIMITATIONS
1. Only lets you add one locker at a time.
2. Keeps adding the attach drive to the path.
3. HESIOD requires that you use the MIT nameservers.
4. CMU AFS requires that the lockers are system:anyuser readable.
5. Only adds drive to current session path (OS/2 limitation).
6. No error checking.
Written by Kent Lundberg (klund@mit.edu), March 1996.
http://web.mit.edu/os2/www/afsos2.html
*/
arg sLockerName
sDummyDrive = 'k:'
sQueueName = 'afshesq8'
call RXQUEUE 'Create',sQueueName
call RXQUEUE 'Set',sQueueName
'@echo off'
'hesinfo' sLockerName 'filsys | rxqueue' sQueueName '/fifo'
parse pull sHesInfo
parse var sHesInfo afs sAfsLockerPath stuff
sBinLockerPath = substr(sAfsLockerPath'/arch/os2/bin',5)
say "Attaching" sBinLockerPath ...
'drvdetch' sDummyDrive '1>nul 2>nul'
'drvattch' sDummyDrive sBinLockerPath '1>nul 2>nul'
set "path=%path%;"sDummyDrive"\"
call RXQUEUE 'Delete',sQueueName