From: djk Date: Sun, 13 Dec 1998 22:38:04 +0000 (+0000) Subject: 1. Fixed VS6 lat/long in prefix_data and wpxloc.raw X-Git-Tag: R_1_11~1 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd23bedbdb72ae107893f94c7eabcfe18867fb41;p=spider.git 1. Fixed VS6 lat/long in prefix_data and wpxloc.raw 2. Sorted out last in times for remote users 3. editted and substitued G0RDI's version of the install instructions over mine in spider/html 4. fixed telnet connections 5. added connect instructions to html tree. --- diff --git a/Changes b/Changes index 19c7570f..7a870fba 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,10 @@ +13Dec98======================================================================== +1. Fixed VS6 lat/long in prefix_data and wpxloc.raw +2. Sorted out last in times for remote users +3. editted and substitued G0RDI's version of the install instructions over +mine in spider/html +4. fixed telnet connections +5. added connect instructions to html tree. 12Dec98======================================================================== 1. Incorporated sh/st, (un)set/lockout, forward/opername from Iain G0RDI 2. Added group handling with (un)set/group, show/group. This allows arbitrary diff --git a/cmd/announce.pl b/cmd/announce.pl index 4f521dd3..b839e9c7 100644 --- a/cmd/announce.pl +++ b/cmd/announce.pl @@ -12,6 +12,8 @@ # # $Id$ # +# Modified 13Dec98 Iain Phillips G0RDI +# my ($self, $line) = @_; my @f = split /\s+/, $line; @@ -34,8 +36,13 @@ if ($sort eq "FULL") { @locals = map { $_->priv >= 5 ? $_ : () } @locals; $to = "SYSOP"; $sysopflag = '*'; -} else { +} elsif ($sort eq "LOCAL") { + $line =~ s/^$f[0]\s+//; # remove it $to = "LOCAL"; +} elsif ($sort eq "") { + $to = "LOCAL"; +} else { + return (1, $self->msg('e11')); } Log('ann', $to, $from, $line); diff --git a/cmd/load/prefixes.pl b/cmd/load/prefixes.pl new file mode 100644 index 00000000..cd211ba8 --- /dev/null +++ b/cmd/load/prefixes.pl @@ -0,0 +1,8 @@ +# +# load the prefix_data file after changing it +# +my $self = shift; +return (0, $self->msg('e5')) if $self->priv < 9; +my $out = Prefix::load(); +return (1, $out ? $out : $self->msg('ok')); + diff --git a/cmd/show/station.pl b/cmd/show/station.pl index d3a70865..2a7034e1 100644 --- a/cmd/show/station.pl +++ b/cmd/show/station.pl @@ -56,16 +56,16 @@ if (@f == 0) { my $seek = $cref->mynode->call if $cref; if ($seek) { - push @out, "User : $call (at $seek)"; + push @out, "User : $call (at $seek)"; } else { - push @out, "User : $call"; + push @out, "User : $call"; } - push @out, "Name : $name" if $name; - push @out, "Last Connect : $last" if $last; - push @out, "QTH : $qth" if $qth; - push @out, "Location : $latlong ($qra)" if $latlong || $qra ; - push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km. $from", $bearing, $miles, $dx) if $latlong; - push @out, "Home Node : $homenode" if $homenode; + push @out, "Name : $name" if $name; + push @out, "Last Connect : $last" if $last; + push @out, "QTH : $qth" if $qth; + push @out, "Location : $latlong ($qra)" if $latlong || $qra ; + push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km. $from", $bearing, $miles, $dx) if $latlong; + push @out, "Home Node : $homenode" if $homenode; } else { push @out, $self->msg('usernf', $call); } diff --git a/data/prefix_data.pl b/data/prefix_data.pl index f304ecb8..2d0470b6 100644 --- a/data/prefix_data.pl +++ b/data/prefix_data.pl @@ -3146,7 +3146,7 @@ 459 => bless( { name => 'Australia-VK', dxcc => 198, itu => 59, cq => 30, utcoff => -10.0, lat => -42.9, long => 147.3 }, 'Prefix'), 460 => bless( { name => 'Australia-VK', dxcc => 198, itu => 55, cq => 30, utcoff => -9.0, lat => -12.5, long => 130.9 }, 'Prefix'), 461 => bless( { name => 'Cocos-Keeling-VK9/Y', dxcc => 201, itu => 54, cq => 29, utcoff => -6.30, lat => -12.2, long => 96.8 }, 'Prefix'), - 462 => bless( { name => 'Hong-Kong-VS', dxcc => 218, itu => 44, cq => 24, utcoff => -8.0, lat => 22.5, long => 144 }, 'Prefix'), + 462 => bless( { name => 'Hong-Kong-VS', dxcc => 218, itu => 44, cq => 24, utcoff => -8.0, lat => 22.25, long => 114.25 }, 'Prefix'), 463 => bless( { name => 'India-Calcutta-VU', dxcc => 219, itu => 41, cq => 22, utcoff => -5.30, lat => 22.6, long => 88.4 }, 'Prefix'), 464 => bless( { name => 'India-New-Delhi-VU', dxcc => 219, itu => 41, cq => 22, utcoff => -5.30, lat => 28, long => 77 }, 'Prefix'), 465 => bless( { name => 'India-VU', dxcc => 219, itu => 41, cq => 22, utcoff => -5.30, lat => 28, long => 77 }, 'Prefix'), diff --git a/data/wpxloc.raw b/data/wpxloc.raw index 546c9051..00c12317 100644 --- a/data/wpxloc.raw +++ b/data/wpxloc.raw @@ -699,7 +699,7 @@ VR6 Pitcairn-Is-VP6 217 63 32 8.30 25 6 0 S 130 6 0 W VP9 Bermuda-VP9 215 11 5 4.0 32 18 0 N 64 42 0 W @ VQ9 Chagos-VQ9 216 41 31 -5.0 7 18 0 S 72 24 0 E @ VS Hong-Kong-VS 218 44 24 -8.0 22 30 0 N 114 0 0 E @ -VR2,VS6 Hong-Kong-VS 218 44 24 -8.0 22 30 0 N 144 0 0 E +VR2,VS6 Hong-Kong-VS 218 44 24 -8.0 22 14 0 N 114 14 0 E VU India-Bombay-VU 219 41 22 -5.30 19 0 0 N 72 48 0 E * @ VU India-Calcutta-VU 219 41 22 -5.30 22 36 0 N 88 24 0 E * VU India-New-Delhi-VU 219 41 22 -5.30 28 0 0 N 77 0 0 E diff --git a/html/connect.html b/html/connect.html new file mode 100644 index 00000000..b5a067b0 --- /dev/null +++ b/html/connect.html @@ -0,0 +1,113 @@ + + + + Connecting to other Clusters + + + +

Connecting to other Clusters

+ +
+
Dirk Koopman G1TLH
+

+ + +Last modified: Sun Dec 13 22:31:33 GMT 1998 + +

At the moment, anybody can connect inwards at any time from outside, either by ax25 or by + telnet (assuming you have followed the instructions in installation + instructions. However, in order to connect outwards, you will need to create connect scripts. + +

Connect scripts live in the /spider/connect directory and are simple ascii scripts + that are written using a normal editor. There are a couple of examples in the issue directory. + +

Here are a couple of basic types, first a telnet connection:- +

+    timeout 15
+    # this is a comment
+    connect telnet dirkl.tobit.co.uk
+    'login' 'gb7djk'
+    'word' 'gb7djk'
+    client /usr/bin/perl /spider/perl/client.pl gb7djk-1 telnet
+	
+

and an ax25 example:- +

+    timeout 60
+    abort (Busy|Sorry|Fail)
+    # don't forget to chmod 4775 netrom_call!
+    connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
+    'Connect' ''
+    'Connect' 'c np7'
+    'Connect' 'c gb7dxm'
+    'Connect' ''
+    client /usr/bin/perl /spider/perl/client.pl gb7dxm ax25
+	
+ +

A connection is started manually by typing in connect on a sysop enabled + client.pl session. For example:- +

+    G1TLH de GB7DJK 13-Dec-1998 2041Z > connect gb7djk-1
+    connection to GB7DJK-1 started
+    G1TLH de GB7DJK 13-Dec-1998 2043Z > 
+    
+ +

You can watch the progress of the connection (if you have the standard debugging enabled) on the + cluster.pl screen and you should see something like this:- +

+    <- D G1TLH connect gb7djk-1
+    -> D G1TLH connection to GB7DJK-1 started
+    -> D G1TLH G1TLH de GB7DJK 13-Dec-1998 2046Z >
+    timeout set to 15
+    CONNECT sort: telnet command: dirkl.tobit.co.uk
+    CHAT "login" -> "gb7djk"
+    received "
+    Red Hat Linux release 5.1 (Manhattan)
+    Kernel 2.0.35 on an i586
+    "
+    received "login: "
+    sent "gb7djk"
+    CHAT "word" -> "gb7djk"
+    received "gb7djk
+ 
+    "
+    received "Password: "
+    sent "gb7djk"
+    Connected to GB7DJK-1, starting normal protocol
+    <- O GB7DJK-1 telnet
+    -> B GB7DJK-1 0
+    GB7DJK-1 channel func  state 0 -> init
+    <- D GB7DJK-1 
+    <- D GB7DJK-1 Last login: Sun Dec 13 17:59:56 from dirk1
+    <- D GB7DJK-1 PC38^GB7DJK-1^~
+    <- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users  Max users 0  Uptime 0 00:00^5447^~
+    etc
+    
+ +

The connect scripts consist of lines which start with the following keywords or symbols:- +

+
+
$Id
+ + diff --git a/html/index.html b/html/index.html index fa9f7b31..adfa769a 100644 --- a/html/index.html +++ b/html/index.html @@ -11,7 +11,7 @@
-Last modified: Wed Dec 2 19:46:16 GMT 1998 +Last modified: Sun Dec 13 22:29:57 GMT 1998

The DXSpider dx cluster system is written in perl5 as an exercise in self-training for both protocol research and teaching myself perl. @@ -21,6 +21,7 @@ Last modified: Wed Dec 2 19:46:16 GMT 1998

  1. Installation of the main cluster software.
  2. Installing the lastest version of CPAN. +
  3. Connecting to other clusters.
diff --git a/html/install.html b/html/install.html index 5ffef8d1..36e7ce1c 100644 --- a/html/install.html +++ b/html/install.html @@ -1,178 +1,188 @@ - - - - Installing Spider - - - -

Installing Spider

- -
-
+ + + + +Spider-HOWTO + + + + +

+

Installing DX Spider on RedHat 5.1

+


+

Iain Phillips G0RDI

+

-Last modified: Wed Dec 2 18:19:38 GMT 1998 - - -

This version of dxspider requires perl5 (it is written entirely in perl5 and - makes extensive use of perl objects). This program is known to work with - RedHat 5.1 perl5_004.

- -

In addition to the standard perl5 distribution you will require to load the - the following modules:-

- -
    -
  1. CPAN - this has a load of the standard extra stuff in it. To load it type:- - -
    -  # perl -MCPAN -e shell
    -  cpan> install Bundle::CPAN
    -  cpan> q
    -     
    - -

    Please sure there were no errors, be particularly careful when installing - libwww stuff, I would suggest 'no host lookups' and pressing <space> and - enter for each of the offered default hostnames.

    - -

    I have monitored a typical load of CPAN which you can - look at here

    - -
  2. Date::Parse, MLDBM, IO::Select - -

    As you have so carefully loaded it, I suggest you use the CPAN system - above:-

    -
    -  # perl -MCPAN -e shell
    -  cpan> install Date::Parse
    -  ..
    -  ..
    -  cpan> install MLDBM
    -  ..
    -  ..
    -  cpan> install IO::Select
    -        
    -

    In order to use IO::Select you will need to

    -
    -  # cd /root/.cpan/build/IO-1.20  
    -  # make install UNINST=1
    -        
    -

    The 'cd' is to the place where CPAN sets up its local cache. The example - shown is for Linux defaults.

    - -
  3. select a user to run the cluster as UNDER _NO_ CIRCUMSTANCES USE ROOT. - -

    I say again DO NOT USE root.

    - -

    Pick an existing user or create a new one. Don't care which. I don't know - your security requirements.

    - -
  4. login as root (I shall use 'jim' for any examples).
    - -
  5. type in the following:- -
    -   # cd ~jim
    -   # tar xvfz spider-x.x.tar.gz
    -   # ln -s ~jim/spider /spider
    -   # groupadd -g 251 spider       (or another number)
    -   # vi /etc/group                (or your favorite editor)
    -		
    - -

    add jim (or whatever) and root to the group spider - it should look something like:-

    - -
    -     spider:x:251:jim,root
    -     :x
    -   # chown -R jim.spider spider
    -   # find . -type d -exec chmod 2775 {} \;
    -   # find . -type f -exec chmod 775 {} \;
    -		
    -

    This last step allows various users of group spider to have write - access to all the directories. Not really needed for now but will - be useful when web interfaces start to appear.

    - -
  6. if you have any users that require network logins, set them up as real - users with useradd -m <callsign>. Alter the default .bashrc so that it - contains just one line (assuming you use the default bash shell). - -
    -		exec /spider/perl/client.pl <callsign> telnet
    -		
    - -

    Don't forget to give them a real password. This is really for network - cluster logins. The telnet argument does two things, it sets the EOL - convention to \n rather than AX25's \r and it automatically reduces - the privilege of the <callsign> to a 'safe[r]' level.

    - -
  7. for incoming AX25 connections you are expected to have got the AX25 - utilities setup, tested and working. See the AX25-HOWTO for more info - on this - it really is outside the scope of this document. I would - recommend using ax25-utils-2.1.42a-5.i386.rpm or above as a starting - point. DXSpider uses ax25d for incoming connections. You need to have - entries like this:- -
    +Last modified: Sun Dec 13 22:00:19 GMT 1998
    +

    +

    This HOWTO describes the installation for DX Spider v1.11 on a "vanilla" Red Hat 5.1 platform, and assumes that you have started with a clean disk, with nothing other than the standard Red Hat 5.1 distribution. I always select 'everything', and that seems to ensure that nothing is missed out :-)

    +

    In addition to the standard Red Hat distribution you will require the following CPAN modules: -

    + + +

    MD5-1.7.tar.gz
    +Data-Dumper-2.10.tar.gz
    +FreezeThaw-0.3.tar.gz
    +MLDBM-2.00.ar.gz
    +TimeDate-1.8.tar.gz
    +IO-1.20.tar.tgz
    +Net-Telnet-3.01.tar.gz

    +
    + +

    You'll also need the AX25 utility package. There is much debate about what is "best", what is "better". What works for 5.1 is this: -

    + + +

    ax25-utils-2.1.42a-1.i386.rpm

    +
    + +

    This can be found at (among other places) ftp://contrib.redhat.com. Note that no attempt is made within this document to describe the steps necessary to install and commission the AX25 kernel package. It remains the responsibility of the reader to have sufficient knowledge and expertise to make this part of the system operation (and to be satisfied that it is operational) before attempting to install DX Spider. Read the AX25-HOWTO and ask around if you + still have trouble after that.

    +

    The last "must have" is the DX Spider distribution itself, and this is available via: -

    + + +

    http://www.dxcluster.org

    +

     

    +
    + +
      + +
    1. Copy the CPAN modules listed above to a convenient place on your computer. For no good reason, I put mine in /usr/local/packages, and the instructions which follow will assume that that's where yours are, too.
    2. +

      Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: -

      +
      # tar xvfz /usr/local/packages/MD5-1.7.tar.gz
      +# cd MD5-1.7
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz
      +# cd Data-Dumper-2.10
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/FreezeThaw-0.3.tar.gz
      +# cd FreezeThaw-0.3
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/MLDBM-2.00.tar.gz
      +# cd MLDBM-2.00
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/TimeDate-1.08.tar.gz
      +# cd TimeDate-1.08
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/IO-1.20.tar.gz
      +# cd IO-1.20
      +# make Makefile.PL
      +# make test
      +# make install UNINST=1
      +# cd ..
      +#
      +# tar xvfz /usr/local/packages/Net-Telnet-3.01.tar.gz
      +# cd Net-Telnet-3.01.tar.gz
      +# make Makefile.PL
      +# make test
      +# make install
      +# cd ..
      +#
      +
      +

      Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.

      +
    3. Create a user to run the cluster under. UNDER NO CIRCUMSTANCES USE ROOT
    4. +

      Again: DO NOT USE root.

      +

      In the instructions which follow, it is assumed that this user is called 'sysop'. You may call it anything you wish. Depending upon your security requirements, you may choose to use an existing user. This will be your choice, not ours!

      +

      # adduser -m sysop

      +

      Now set a password for the user:-

      +
      #
      +# passwd sysop
      +# New UNIX password:
      +# Retype new UNIX password:
      +passwd: all authentication tokens updated successfully
      +

      # Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.

      +
    5. Now unpack the DX Spider distribution, set symbolic links and group permissions like this (assumes that the version we're interested in is 1.9. The distribution tar file may be named slightly differently in your case: -
    6. +
      # cd ~sysop
      +# tar xvfz spider-1.9.tar.gz
      +# ln -s ~sysop/spider /spider
      +# groupadd -g 251 spider       (or another number)
      +# vi /etc/group                (or your favorite editor)
      +
      +

      add 'sysop', your own callsign (in my case 'g0rdi' - which will be used as an alias) and 'root' to the group spider. The result should look something like:-

      +
      spider:x:251:sysop,g0rdi,root
      +
    7. Next step is to set permissions on the 'spider' directory tree and files:-
    8. +
      # chown -R sysop.spider spider
      +# find . -type d -exec chmod 2775 {} \;
      +# find . -type f -exec chmod 775 {} \;
      +
      +

      This last step allows various users of group spider to have write access to all the directories. Not really needed for now but will be useful when web interfaces start to appear.

      +
    9. Should you have any users that require network logins, set them up as real users with 'useradd -m <callsign>'. Alter the default .bashrc so that it contains just one line (assuming you use the default bash shell).
    10. +
      +exec /spider/perl/client.pl <callsign> telnet
      +
      +

      Alternatively you can set up a real login for a person (or another cluster) by creating a login using:- +

      +# useradd gb7djk
      +# passwd gb7djk
      +New UNIX password: 
      +Retype new UNIX password: 
      +passwd: all authentication tokens updated successfully
      +
      +

      and editing the /etc/passwd file to look like this (do substitute the correct callsigns here ;-):- +

      +fbb:x:505:505::/home/fbb:/bin/bash
      +gb7djk:x:506:506::/home/gb7djk:/usr/bin/perl /spider/perl/client.pl gb7djk telnet
      +
      +

      Don't forget to give them a real password. This is really for network cluster logins. The telnet argument does two things, it sets the EOL convention to \n rather than AX25's \r and it automatically reduces the privilege of the <callsign> to a 'safe[r]' level.).

      +
    11. As mentioned earlier, for AX25 connections you are expected to have the AX25 utilities installed, setup, tested and working. See the AX25-HOWTO for more info on this - it really is beyond the scope of this document DX Spider uses ax25d for incoming connections. You need to have entries like this:-
    12. +
          [ether]                                                                         
          NOCALL   * * * * * *  L                                                         
      -   default  * * * * * *  - jim /spider/perl/client.pl client.pl %u ax25
      -   <bbs>
      +   default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
      +   <bbs>
          NOCALL   * * * * * *  L                                                         
      -   default  * * * * * *  - jim /spider/perl/client.pl client.pl %u ax25
      -		
      - -

      where ether and bbs are appropriate KNOWN WORKING axport and nrport - names respectively.

      - -

      Obviously you can use different names, callsigns or whatever for your - purposes, but it is up to you to get it to work.

      - -

      Note I use BPQ over ethernet which why I have the port names I have.

      - -
    13. Find your netrom_call and ax25_call programs (which on - my system live in /usr/sbin and chmod them so that they are SUID root -
      -   # chown root ax25_call netrom_call
      -   # chmod 4775 ax25_call netrom_call
      -        
      -

      This has to be done to allow you to specify the correct callsigns on outgoing connects

      - -
    14. login as jim (or whatever) -
      -   $ startx                     (much easier to use X)
      +   default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
      +
      +

      where 'ether' and 'bbs' are appropriate KNOWN WORKING axport and nrport names respectively. Obviously you can use different names, callsigns or whatever for your purposes, but it is up to you to get it to work. Note I use BPQ over ethernet which why I have the port names I have.

      +
    15. Find your netrom_call and ax25_call programs (which on my system live in /usr/sbin) and chmod them so that they are SUID root
    16. +
         # chown root ax25_call netrom_call
      +   # chmod 4775 ax25_call netrom_call
      +

      This has to be done to allow you to specify the correct callsigns on outgoing connects

      +
    17. Login to your computer as sysop, and create the initial DX Spider parameters necessary to start the cluster for the first time.
    18. +
         $ startx			(much easier to use X)
          $ cd /spider
          $ mkdir local
          $ mkdir local_cmd
          $ cp perl/DXVars.pm local
          $ cd local
      -   $ vi DXVars.pm
      -		
      -

      now alter your cluster callsign, sysop callsign and other user info - as you wish. Note that this a perl file which will parsed and executed - as part of the cluster. If you get it wrong then perl will complain - when you start the cluster process.

      - -

      PLEASE USE CAPITAL LETTERS FOR CALLSIGNS

      - -

      DON'T alter the DXVars.pm (or any other file) in /spider/perl, they are - overwritten with every release. Any files or commands you place in - /spider/local or /spider/local_cmd will automagically be used in preference - to the ones in /spider/perl EVEN whilst the cluster is running!

      -
      +   $ vi DXVars.pm			(or 'joe DXVars.pm' if you're a WordStar fan ;-)
      +
      +

      Using the distributed DXVars.pm as a a template, set your cluster callsign, sysop callsign and other user info to suit your own environment. Note that this a perl file which will be parsed and executed as part of the cluster. If you get it wrong then perl will complain when you start the cluster process.

      +

      PLEASE USE CAPITAL LETTERS FOR CALLSIGNS

      +

      DON'T alter the DXVars.pm (or any other file) in /spider/perl, they are overwritten with every release. Any files or commands you place in /spider/local or /spider/local_cmd will automagically be used in preference to the ones in /spider/perl EVEN whilst the cluster is running!

      +
          :x
          
          $ cd ../perl
      -		
      - -

      now create the basic user file with you as the sysop.

      -
      +
      +

      Next, run the following script, which will create the basic user file with you as the sysop.

      +
          $ create_sysop.pl
      -		
      - -

      try and run the cluster program and see whether all the various rivets are - flying in approximate formation...

      - -
      +
      +

      Now attempt to startup the cluster program and see whether all the various rivets are flying in approximate formation...

      +
          $ cluster.pl
      -   DXSpider DX Cluster Version x.x
      +   DXSpider DX Cluster Version 1.9
          Copyright (c) 1998 Dirk Koopman G1TLH
          loading prefixes ...
          loading band data ...
      @@ -181,41 +191,33 @@ Last modified: Wed Dec  2 18:19:38 GMT 1998
          reading existing message headers
          reading cron jobs
          orft we jolly well go ...
      -		
      - -
    19. now log in again or start another rxvt or xterm -
      -   $ client.pl
      -		
      - -

      you should now see a normal cluster prompt.

      - -

      at the cluster prompt:-

      -
      -   G1JIM de GB7JIM 10-Sep-98 1000Z> set/node GB7XXX
      -        
      - -

      for every dxcluster you expect to connect to or from.

      - -
      -   G1JIM de GB7JIM 10-Sep-98 1001Z> shutdown
      -		
      +
    +
  8. now log in again (as 'sysop') or start another rxvt or xterm
  9. -

    The cluster and the client should both go back to prompts - -

    Restart the cluster. - -

    The callsigns should be the sysop callsign and the cluster callsign - as per your modified DXVars.pm. You can check that the cluster - connections will work by:- -

    +
    +   $ client.pl
    +
    +

    at the cluster prompt (which will look something like):-

    +
    +   G1JIM de GB7JIM 12-Dec-98 1718Z >
    +
    +Type: +
    +   set/node GB7XXX
    +
    +

    (where 'GB7XXX' is a DX cluster which you expect to connect to or from).

    +

    Now shut the cluster down by simply typing 'shutdown' at the prompt.

    +

    The cluster and the client should both go back to prompts

    +

    The callsigns should be the sysop callsign and the cluster callsign +as per your modified DXVars.pm. You can check that the cluster +connections will work by:- +

        $ client.pl gb7xxx      (doesn't have to be uppercase).
        PC38^GB7JIM^~           <- the cluster thinks this is a cluster
        ^C                      <- to get out
    -        
    -
- -
-
Version: $Id$
- - + + +
+
Version: $Id$
+ + diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 4fce8298..9831e396 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -205,6 +205,7 @@ sub normal last SWITCH if !$node; # ignore if havn't seen a PC19 for this one yet my $i; + for ($i = 2; $i < $#field; $i++) { my ($call, $confmode, $here) = $field[$i] =~ /^(\S+) (-) (\d)/o; next if length $call < 3; @@ -219,9 +220,9 @@ sub normal $call =~ s/-\d+$//o; # remove ssid for users my $user = DXUser->get_current($call); $user = DXUser->new($call) if !$user; + $user->homenode($node->call) if !$user->homenode; $user->node($node->call); $user->lastin($main::systime); - $user->homenode($node->call) if !$user->homenode; $user->put; } @@ -269,11 +270,11 @@ sub normal if (!$user) { $user = DXUser->new($call); $user->sort('A'); - $user->node($call); $user->homenode($call); - $user->lastin($main::systime); - $user->put; + $user->node($call); } + $user->lastin($main::systime); + $user->put; } # queue up any messages diff --git a/perl/Prefix.pm b/perl/Prefix.pm index 441cd80a..ae431485 100644 --- a/perl/Prefix.pm +++ b/perl/Prefix.pm @@ -29,9 +29,11 @@ sub load %prefix_loc = (); } $db = tie(%pre, "DB_File", undef, O_RDWR|O_CREAT, 0666, $DB_BTREE) or confess "can't tie \%pre ($!)"; - confess $@ if $@; - do "$main::data/prefix_data.pl"; + my $out = $@ if $@; + do "$main::data/prefix_data.pl" if !$out; + $out = $@ if $@; # print Data::Dumper->Dump([\%pre, \%prefix_loc], [qw(pre prefix_loc)]); + return $out; } sub store diff --git a/perl/client.pl b/perl/client.pl index b7bb5452..d431a0d1 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -40,9 +40,10 @@ BEGIN { use Msg; use DXVars; use DXDebug; +use IO::File; use IO::Socket; use IPC::Open2; -use FileHandle; +use Net::Telnet qw(TELOPT_ECHO); use Carp; # cease communications @@ -181,17 +182,24 @@ sub doconnect dbg('connect', "CONNECT sort: $sort command: $line"); if ($sort eq 'telnet') { # this is a straight network connect - my ($host) = $line =~ /host\s+(\w+)/o; - my ($port) = $line =~ /port\s+(\d+)/o; + my ($host, $port) = split /\s+/, $line; $port = 23 if !$port; - $sock = IO::Socket::INET->new(PeerAddr => "$host", PeerPort => "$port", Proto => 'tcp') - or die "Can't connect to $host port $port $!"; - + if ($port == 23) { + $sock = new Net::Telnet (Timeout => $timeout, BinMode => 1); + $sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO); + #$sock->option_log('option_log'); + $sock->dump_log('dump'); + $sock->open($host) or die "Can't connect to $host port $port $!"; + } else { + $sock = IO::Socket::INET->new(PeerAddr => "$host:$port", Proto => 'tcp') + or die "Can't connect to $host port $port $!"; + + } } elsif ($sort eq 'ax25') { my @args = split /\s+/, $line; - $rfh = new FileHandle; - $wfh = new FileHandle; + $rfh = new IO::File; + $wfh = new IO::File; $pid = open2($rfh, $wfh, "$line") or die "can't do $line $!"; dbg('connect', "got pid $pid"); $wfh->autoflush(1); @@ -224,21 +232,24 @@ sub dochat alarm($timeout); if ($expect) { - if ($csort eq 'telnet') { - $line = <$sock>; - chomp; - } elsif ($csort eq 'ax25') { - local $/ = "\r"; - $line = <$rfh>; - $line =~ s/\r//og; - } - dbg('connect', "received \"$line\""); - if ($abort && $line =~ /$abort/i) { - dbg('connect', "aborted on /$abort/"); - cease(11); + for (;;) { + if ($csort eq 'telnet') { + $line = $sock->get(); + chomp; + } elsif ($csort eq 'ax25') { + local $/ = "\r"; + $line = <$rfh>; + $line =~ s/\r//og; + } + dbg('connect', "received \"$line\""); + if ($abort && $line =~ /$abort/i) { + dbg('connect', "aborted on /$abort/"); + cease(11); + } + last if $line =~ /$expect/i; } } - if ($send && (!$expect || $line =~ /$expect/i)) { + if ($send) { if ($csort eq 'telnet') { $sock->print("$send\n"); } elsif ($csort eq 'ax25') { @@ -270,7 +281,7 @@ $lasttime = time; # lasttime something happened on the interface $outqueue = ""; # the output queue length $buffered = 1; # buffer output $savenl = ""; # an NL that has been saved from last time -$timeout = 30; # default timeout for connects +$timeout = 60; # default timeout for connects $abort = ""; # the current abort string $cpath = "$root/connect"; # the basic connect directory