Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!EARTH.LERC.NASA.GOV!jshoj From: jshoj@EARTH.LERC.NASA.GOV ("Jeffery Hojnicki") Newsgroups: comp.sys.apollo Subject: RE: lcnode bug (was Handy Aegis Script) Message-ID: <8912062227.AA00850@umix.cc.umich.edu> Date: 6 Dec 89 22:15:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 49 Dennis Cottel writes: >lori@hacgate.UUCP (Lori Barfield) sends us a nifty shell script including >some constructions like: > >> /com/lcnode -b -id | /com/fpat -i -c -rm 2 ^node | read num_matches > >The trouble with this is that if you have an Apollo internet--for >instance, several rings connected via Ethernet--commands like lcnode >and lusr display only information for the local subnet. There is no >option on them to display all the connected nodes in the Apollo >internetwork. > >This means that when you go to an internetwork, suddenly all the shell >scripts in which you used tricks like the above to find all the nodes, >or update all the disks in the network, don't work anymore and have to >be modified. And changed again when you add another subnet. Some of >the nice network transparency that is Apollo's strength has been >taken away. Although this is true for some applications, the instance sited is easily fixed with the lcnet command. Use lcnet to get a listing of the connected networks and then do an lcnode on each network. A script to do just that follows. Jeff Hojnicki -- My opinions are not those of NASA NASA LeRC JSHOJ@earth.lerc.nasa.gov Some of the lines in my scripts are not always the most elegant, but they usually get the job done. --------------------CUT HERE------------------------------------------------ #!/com/sh eon # Get connected net id's NETS := ^"lcnet -c | chpat '{????????}?*' '@1'" # substitute appropriate options on lcnode command # .aaaa is needed on the from node spec, but any hex code will do for NET in ^NETS by word args "^NET" | read -type string THISNET lcnode -b -id -from ^THISNET.aaaa endfor