Annotation of 43BSDReno/contrib/isode-beta/others/quipu/uips/dish/dsaping, revision 1.1

1.1     ! root        1: #!/bin/sh 
        !             2: #Calculate unique TCP port based on PID
        !             3: start=${1-c=GB}
        !             4: ppid=$$
        !             5: gooddsa=0
        !             6: baddsa=0
        !             7: ditsize=0
        !             8: if ( test $ppid-lt10000 )
        !             9: then
        !            10:        ppid=`expr $ppid + 10000`
        !            11: fi
        !            12: DISHPROC="127.0.0.1 $ppid"
        !            13: export DISHPROC
        !            14: if ( bind -noa )
        !            15: then
        !            16:        echo -n
        !            17: else
        !            18:        exit 1
        !            19: fi
        !            20: moveto @
        !            21: if [ $start != "root" ]
        !            22: then 
        !            23:        moveto $start
        !            24: fi
        !            25: for j in `search -filter objectclass=quipuDSA -nosize -time 500 -type presentationaddress -noname`
        !            26: do
        !            27:        echo -n "Trying "
        !            28:        moveto -nocheck -pwd $j
        !            29:        if ( bind -c `showentry -type presentationaddress -nokey` -noa 2>/dev/null )
        !            30:        then 
        !            31:                gooddsa=`expr $gooddsa + 1`
        !            32:                if ( dsacontrol -info > /tmp/dsainfo 2>/dev/null )
        !            33:                then
        !            34:                        dsasize=`awk < /tmp/dsainfo '{ printf $1 }'`
        !            35:                        echo Size $dsasize
        !            36:                        ditsize=`expr $ditsize + $dsasize`
        !            37:                else
        !            38:                        echo Contacted
        !            39:                fi
        !            40:        else
        !            41:                echo Failed
        !            42:                baddsa=`expr $baddsa + 1`
        !            43:        fi
        !            44: done
        !            45: echo
        !            46: echo $gooddsa DSAs contacted
        !            47: echo $baddsa connections failed
        !            48: echo
        !            49: echo Counted $ditsize entries
        !            50: rm -f /tmp/dsainfo
        !            51: unbind

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.