[21574] in Athena Bugs
Problem with "add" alias and "-M" attach option
daemon@ATHENA.MIT.EDU (Tom Cavin)
Thu Mar 6 18:31:59 2003
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15975.55908.810397.110217@lap1-wccf.mit.edu>
Date: Thu, 6 Mar 2003 18:31:48 -0500
From: Tom Cavin <cavin@MIT.EDU>
To: Athena Bugs list <bugs@MIT.EDU>
CC: Tom Cavin <cavin@MIT.EDU>
Hi,
I'w working on setting up my laptop for detached operations and I wanted to
be able to attach either a local copy of some lockers or the real master.
The command I tried to use is:
/bin/athena/attach -Padd -b $add_flags -M "$@"
(The context is in a BASH alias, that does an eval on the output, with the
$add_flags variable set to "" and the "$@" picking up the locker name.)
An actual command line would be something like:
/bin/athena/attach -Padd -b -M wccf
and it should attach the locker and generate the new *PATH environment
commands.
I tested this using TCSH and BASH. The results are:
/bin/athena/attach -M LOCKER_NAME # works fine
/bin/athena/attach -Padd LOCKER_NAME # works fine in TCSH
/bin/athena/attach -Padd -b LOCKER_NAME # works fine in BASH
/bin/athena/attach -Padd -M LOCKER_NAME # FAILS in TCSH
/bin/athena/attach -Padd -b -M LOCKER_NAME # FAILS in BASH
The error that is generated is a simple usage message:
$ attach -Padd -b -M wccf
Usage: add [-vfrpwbq] [-P $athena_path] [-a attachflags] [lockername ...]
add [-dfrb] [-P $athena_path] pathname ...
A temporary work around for me is to have a different alias for adding the
master locker:
$ type aadd
aadd is a function
aadd ()
{
this_locker="$@";
/bin/athena/attach -M ${this_locker};
eval "$( /bin/athena/attach -Padd -b $add_flags ${this_locker} )";
unset this_locker
}
All this does is use the two working pieces separately instead of in a
single process.
The "real" solition is to fix the "attach -Padd" option to allow the "-M"
flag for a locker.
Not a biggie, but I thought you'd want to know.
Thanks,
--Tom
--
Tom Cavin Phone: (617) 258 - 7806
Computer Operations Manager Email: cavin@mit.edu
MIT - Whitaker College Computer Facility or tec@ai.mit.edu