Received: from ashton.a-t.COM by FRIDAY.A-T.COM; Fri, 5 May 89 17:57 PDT Received: by ashton.a-t.COM (4.12/UUCP-Project/rel-1.0/12-09-86) id AA06997; Fri, 5 May 89 18:01:50 pdt Date: Fri, 5 May 89 18:01:50 pdt From: Kevin Carosso To: kvc@FRIDAY.A-T.COM Message-Id: <8905060101.AA06997@ashton.a-t.COM> Path: ashtate!hacgate!usc!bbn!apple!rutgers!tut.cis.ohio-state.edu!ucbvax!campus.swarthmore.EDU!JAMISON From: JAMISON@campus.swarthmore.EDU ("John L. Jamison x8508") Newsgroups: comp.os.vms Subject: Mod to K.Carosso's DECW_LOGIN_SATELLITES.COM Message-ID: <8905050732.AA10002@ucbvax.Berkeley.EDU> Date: 5 May 89 06:17:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 143 Thanks to Kevin Carosso for the DECW_LOGIN_SATELLITES.COM procedure which he posted to this forum a while ago. It really speeds up the use of DECwindows on a VAXstation 2000 (what wouldn't for that matter). We've been making use of it for a while here, and I've found that I'm often manually doing the commands for setting up satellites as server nodes, and sometimes I have to peek around to see if they're already running the _WS** process, or supporting a DECwindows user already. This can take some time, so I tooled around with the procedure and came up with a means to have it check the current satellite server status for each satellite node in the list. If a DECwindows link is active, then that particular satellite must be already running happy, and the procedure skips to the next node in the list. The premis for the verification procedure is that there is an entry in NCP (known links) which consists of a line with that node name and a remote user of X$X0. My modification simply does two things: 1) writes a file of known links initially, and 2) does a SEARCH on that file for the node name and X$X0 strings, specifying the clause /MATCH=AND. Enjoy- John Jamison System and Network Manager Swarthmore College jamison@campus.swarthmore.edu ---------------------------------------------------------------- $ ! DECW_LOGIN_SATELLITES.COM $ ! - written by Kevin Carosso $ ! - local modifications by John Jamison jamison@campus.swarthmore.edu $ ! $ ! This locally modifiable command procedure is invoked by a slightly $ ! modified DECW$STARTAPPS.COM. Instead of checking to see if we are a $ ! workstation and then starting one DECwindows LOGINOUT process, we $ ! have a list of "satellite" workstations for each host. The host will $ ! start up one DECwindows LOGINOUT process for each of it's designated $ ! satellites. A host may have itself as a satellite. The LOCAL transport $ ! will be used if the host and the satellite are the same, the DECnet $ ! transport will be used otherwise $ ! $ ! Note that we cannot start up a LOGINOUT on a remote workstation unless $ ! we are authorized by an entry in DECW$SERVER_ACCESS_ALLOWED.DAT or $ ! DECW$SERVER_ACCESS_TRUSTED.DAT for that workstation $ ! $ ! The point of thie is to make it easy for workstations to be used as $ ! display-only X servers when necessary $ ! $ ! The host-satellite relationships are defined by symbols of the form: $ ! $ ! HOSTNAME_satellites = comma separated list of satellite names... $ ! $ ! e.g. $ ! BIGVAX_satellites = "VS2000,GPX1,GPX2,PMAX1" $ ! $ ! Put your host/satellite symbol definitions here $ ! $ !------------------------------------------------------------------- $ ! 5/5/89 $ ! When this procedure is invoked with a parameter, the parameter is $ ! taken as a satellite node to be set up as a server of SWAT. $ ! $ ! 5/5/89 $ ! This procedure will first verify client status for each node. If a node $ ! is already an active server, DECW$STARTLOGIN will not be run for that $ ! node. Basically this means that you can run this procedure at any time $ ! even if some of the satellites are already 'serving' SWAT. $ ! In other words, this eliminates the need to individually do each node $ ! when some are already up and running $ ! $ if p1 .eqs. "" $ then $ SWAT_satellites = "VWSCC,VWSDUP,VWSBTR,VWSSGL,VWSSTR" $ else $ workstation := 'p1' $ transport := "DECNET" $ goto single_node $ endif $ ! $ ! generate a list of NCP known links to determine current satellite $ ! servers $ assign/user curlinks.dat sys$Output $ mc ncp show known links exit $ ! $ ! $ node_name = F$EDIT(F$GETSYI("SCSNODE"),"TRIM") $ ! write sys$output "Node_name is ''node_name'" $ if F$TYPE('node_name'_satellites) .eqs. "" then exit $ ! $ ! Start the appropriate session validation $ ! $ n = 0 $ delm := "," $ loop: $ workstation = F$ELEMENT(n,delm, 'node_name'_satellites) $ if workstation .eqs. "," then goto done $ n=n+1 $ gosub check_node $ if clientStat .eqs. "TRUE" then goto loop $ ! $ ! determine the transport to use $ ! $ if (workstation .eqs. "0") .or. (workstation .eqs. node_name) $ then $ transport = "LOCAL" $ else $ transport = "DECNET" $ endif $ ! $ ! Now create the display, this will define DECW$DISPLAY which is then $ ! used by DECW$STARTLOGIN $ ! $ single_node: $ write sys$Output "Setting up node ''workstation'" $ goto loop $ set display/create/perm - /transport='transport'- /node = 'workstation' $ RUN sys$system:decw$startlogin $ deass DECW$DISPLAY $ if p1.nes. "" then goto done $ goto loop $! $ done: $ delete/nolog/noconfirm curlinks.dat;* $ exit $ !---- $ ! check_node checks whether workstation has a known link to user X$X0 $ ! if so, then it is already an active server $ check_node: $ clientStat:="TRUE" $ assign/user nla0: sys$output $ assign/user nla0: sys$error $ search curlinks.dat 'workstation',X$X0/match=and $! $! %X08d78053 is for "no strings matched" $ if $status .eq. %x08d78053 $ then $ clientStat :="FALSE" $ endif $ return