Compare commits

..
Author SHA1 Message Date
Alexander Barton 4d656d12e9 Updated documentation. 2003-04-21 23:31:39 +00:00
Alexander Barton da78dc4785 Updated documentation. 2003-04-21 22:52:18 +00:00
16 changed files with 65 additions and 202 deletions
+5 -15
View File
@@ -10,22 +10,12 @@
-- ChangeLog --
ngIRCd 0.7.0 (2003-05-01)
- "ServerName" is checked better now: a dot (".") is required.
- The KILL comand verifies and logs more parameters.
ngIRCd CVS-HEAD
ngIRCd 0.7.0-pre2 (2003-04-27)
- CVS build system fixes (made autogen.sh more portable).
- Fixed compilation and test-suite on Solaris (tested with 2.6).
- New documentation file "doc/Platforms.txt" describing the status of
ngIRCd on the various tested platforms.
- Test for broken GCC on Mac OS X and disable "-pedantic" in this case.
- Disable "-ansi" on Cygwin: system headers are incompatible.
- The server tried to connect to other servers only once when DNS or
socket failures occured.
- Fixed --configtest: There is no variable "ServerPwd", it's "Password".
- (none)
ngIRCd 0.7.0-pre1
ngIRCd 0.7.0-pre1 (2003-04-22)
- New signal handler (more secure, actions are executed outside).
- GCC: the compiler is now called with more warning options enabled.
- Replaced a lot of str[n]cpy(), str[n]cat() and sprintf() calls with the
@@ -447,4 +437,4 @@ ngIRCd 0.0.1, 31.12.2001
--
$Id: ChangeLog,v 1.188.2.13 2003/05/01 10:15:02 alex Exp $
$Id: ChangeLog,v 1.189 2003/04/21 22:52:18 alex Exp $
+1 -1
View File
@@ -158,4 +158,4 @@ number. In both cases the server exits after the output.
--
$Id: INSTALL,v 1.15.2.1 2003/04/22 20:00:32 alex Exp $
$Id: INSTALL,v 1.16 2003/04/21 23:31:39 alex Exp $
+6 -2
View File
@@ -10,7 +10,11 @@
-- NEWS --
ngIRCd 0.7.0
ngIRCd CVS-HEAD
- (none)
ngIRCd 0.7.0-pre1
- New command CONNECT to enable and add server links. The syntax is not
RFC-compatible: use "CONNECT <name> <port>" to enable and connect an
@@ -161,4 +165,4 @@ ngIRCd 0.0.1, 31.12.2001
--
$Id: NEWS,v 1.53.2.2 2003/04/27 18:33:26 alex Exp $
$Id: NEWS,v 1.54 2003/04/21 22:52:18 alex Exp $
+2 -3
View File
@@ -1,10 +1,9 @@
#!/bin/sh
#
# $Id: autogen.sh,v 1.6.2.1 2003/04/22 10:18:41 alex Exp $
# $Id: autogen.sh,v 1.6 2003/04/13 22:34:17 alex Exp $
#
WANT_AUTOMAKE=1.6
export WANT_AUTOMAKE
export WANT_AUTOMAKE=1.6
aclocal && \
autoheader && \
+3 -29
View File
@@ -8,13 +8,13 @@
# (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information.
#
# $Id: configure.in,v 1.89.2.6 2003/05/01 10:15:02 alex Exp $
# $Id: configure.in,v 1.89 2003/04/21 10:51:44 alex Exp $
#
# -- Initialisierung --
AC_PREREQ(2.50)
AC_INIT(ngircd, 0.7.0)
AC_INIT(ngircd, CVSHEAD)
AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.6)
@@ -76,13 +76,6 @@ if test `uname` = "HP-UX"; then
add_DEFINES="-D_XOPEN_SOURCE_EXTENDED $add_DEFINES"
fi
if test `uname` = "SunOS"; then
# define _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED=1 and __EXTENSIONS__
# when compiling on SunOS (tested with 5.6):
AC_MSG_RESULT([detected SunOS, defining _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED=1 and __EXTENSIONS__])
add_DEFINES="-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ $add_DEFINES"
fi
# -- Header --
AC_HEADER_STDC
@@ -266,26 +259,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
if test "$GCC" = "yes"; then
the_CFLAGS="-Wmissing-declarations -Wpointer-arith -Wstrict-prototypes"
ansi=" -ansi"
pedantic=" -pedantic"
$CC --version | grep 20020420 > /dev/null 2>&1
if test $? -eq 0; then
# Mac OS X (and Darwin?) ship with a slightly broken
# prerelease of GCC 3.1 which don't like -pedantic:
AC_MSG_RESULT([detected broken GNU C compiler, disabling "-pedantic"])
pedantic=""
fi
uname | grep "CYGWIN" > /dev/null 2>&1
if test $? -eq 0; then
# The include files of Cygwin don't like -ansi,
# so we disable it:
AC_MSG_RESULT([detected Cygwin, disabling "-ansi"])
ansi=""
fi
add_CFLAGS="-Wall -W${ansi}${pedantic} $CFLAGS $CFLAGS_ADD"
add_CFLAGS="-Wall -W -ansi -pedantic $CFLAGS $CFLAGS_ADD"
else
the_CFLAGS="$CFLAGS"
add_CFLAGS="$CFLAGS_ADD"
+1 -1
View File
@@ -1,5 +1,5 @@
%define name ngircd
%define version 0.7.0
%define version CurrentCVS
%define release 1
%define prefix %{_prefix}
+1 -5
View File
@@ -19,10 +19,6 @@ A: Yes. ngIRCd is compatible to the original ircd used by IRCNet. Actually
Q: Is there a homepage with further information and downloads?
A: Yes. Please visit <http://arthur.ath.cx/~alex/ngircd/>.
Q: Why should I use ngIRCd instead of the original one?
A: ngIRCd offers several benefits: no problems with dynamic IPs, easy to
configure, open source (GPL), under active development.
II. Compilation
~~~~~~~~~~~~~~~
@@ -64,4 +60,4 @@ A: Please file a bug report at <http://arthur.ath.cx/bugzilla/ngircd/>!
--
$Id: FAQ.txt,v 1.5.2.1 2003/04/29 13:45:09 alex Exp $
$Id: FAQ.txt,v 1.5 2003/04/05 11:37:17 alex Exp $
+3 -3
View File
@@ -9,11 +9,11 @@
# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
#
# $Id: Makefile.am,v 1.16.2.1 2003/04/22 23:52:48 alex Exp $
# $Id: Makefile.am,v 1.16 2003/04/21 08:01:29 alex Exp $
#
EXTRA_DIST = CVS.txt FAQ.txt Protocol.txt Platforms.txt \
README-AUX.txt README-BeOS.txt RFC.txt sample-ngircd.conf
EXTRA_DIST = CVS.txt FAQ.txt Protocol.txt README-AUX.txt \
README-BeOS.txt RFC.txt sample-ngircd.conf
maintainer-clean-local:
rm -f Makefile Makefile.in
-53
View File
@@ -1,53 +0,0 @@
ngIRCd - Next Generation IRC Server
(c)2001-2003 by Alexander Barton,
alex@barton.de, http://www.barton.de/
ngIRCd is free software and published under the
terms of the GNU General Public License.
-- Platforms.txt --
This file lists the status of all platforms on which the ngIRCd has been
tested. Included is the date and version of the last "official" test and
the name of the tester/maintainer.
If you successfully compiled and tested ngIRCd on a platform that isn't
listed here, please contact Alexander Barton, <alex@barton.de>, so that this
list can be updated. Thanks for your help!
the executable works ("runs") as expected --+
tests run successfully ("make check") --+ |
ngIRCd compiles ("make") --+ | |
./configure works --+ | | |
| | | |
Platform Compiler ngIRCd Date Tester C M T R See
--------------------------- ------------ ---------- -------- ------ - - - - ---
i386/pc/solaris2.9 gcc 3.2.2 0.7.x-CVS 03-04-28 alex Y Y Y Y
i386/unknown/freebsd5.0 gcc 3.2.1 0.7.x-CVS 03-04-23 alex Y Y Y Y
i386/unknown/netbsdelf1.6.1 gcc 2.95.3 0.7.x-CVS 03-04-23 alex Y Y Y Y
i686/pc/cygwin gcc 3.2 0.7.x-CVS 03-04-24 alex Y Y n Y
i686/pc/linux-gnu gcc 2.95/3.x 0.7.0-pre1 03-04-22 alex Y Y Y Y (1)
m68k/apple/aux3.1.1 Orig. A/UX 0.7.x-CVS 03-04-22 alex Y Y Y Y (2)
powerpc/apple/darwin6.5 gcc 3.1 0.7.x-CVS 03-04-23 alex Y Y Y Y
sparc/sun/solaris2.6 gcc 2.95.3 0.7.x-CVS 03-04-22 alex Y Y Y Y
Notes
~~~~~
(1) i686/pc/linux-gnu:
ngIRCd has been tested with various Linux distributions, such as SuSE,
RedHat, Debian, and Gentoo using Kernels 2.2.x or 2.4.x and various
versions of the GNU C compiler (2.95.3, 3.0, 3.2 and 3.3). The eldest
glibc used was glibc-2.0.7. ngIRCd compiled and run on all these systems
without problems.
(2) This compiler is an pre-ANSI C compiler, therefore the source code is
automatically converted using the included ansi2knr tool while building.
--
$Id: Platforms.txt,v 1.1.2.4 2003/04/28 00:14:04 alex Exp $
+2 -2
View File
@@ -22,7 +22,7 @@ in all details. But because the ngIRCd should be a fully compatible
replacement for this server ("ircd") it tries to emulate these differences.
If you don't like this behavior please ./configure the ngIRCd using the
"--enable-strict-rfc" command line option. But please note: not all IRC
"--enable-strict-rfc" command line option. But please not: not all IRC
clients are compatible with such an server, some can't even connect at all!
Therefore this option isn't desired for "normal operation".
@@ -104,4 +104,4 @@ channel mode). In this case <limit> should be "0".
--
$Id: Protocol.txt,v 1.9.2.1 2003/04/29 13:42:24 alex Exp $
$Id: Protocol.txt,v 1.9 2003/04/21 12:48:40 alex Exp $
+2 -6
View File
@@ -1,4 +1,4 @@
# $Id: sample-ngircd.conf,v 1.20.2.2 2003/04/29 12:37:17 alex Exp $
# $Id: sample-ngircd.conf,v 1.20 2003/03/10 00:23:34 alex Exp $
#
# This is a sample configuration file for the ngIRCd, which must adept to
@@ -16,17 +16,13 @@
# configuration of the server, like the server name and the ports
# on which the server should be listening.
# Server name in the IRC network, must contain at least one dot
# (".") and be unique in the IRC network.
# Server name in the IRC-network
Name = irc.the.net
# Info text of the server. This will be shown by WHOIS and
# LINKS requests for example.
Info = Server Info Text
# Global password for all users needed to connect to the server
;Password = abc
# Information about the server and the administrator, used by the
# ADMIN command.
;AdminInfo1 = Description
+2 -13
View File
@@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: conf.c,v 1.57.2.2 2003/04/29 12:37:18 alex Exp $";
static char UNUSED id[] = "$Id: conf.c,v 1.57 2003/04/21 11:06:07 alex Exp $";
#include "imp.h"
#include <assert.h>
@@ -108,7 +108,7 @@ Conf_Test( VOID )
puts( "[GLOBAL]" );
printf( " ServerName = %s\n", Conf_ServerName );
printf( " ServerInfo = %s\n", Conf_ServerInfo );
printf( " Password = %s\n", Conf_ServerPwd );
printf( " ServerPwd = %s\n", Conf_ServerPwd );
printf( " AdminInfo1 = %s\n", Conf_ServerAdmin1 );
printf( " AdminInfo2 = %s\n", Conf_ServerAdmin2 );
printf( " AdminEMail = %s\n", Conf_ServerAdminMail );
@@ -837,17 +837,6 @@ Validate_Config( BOOLEAN Configtest )
exit( 1 );
}
}
if( ! strchr( Conf_ServerName, '.' ))
{
/* No dot in server name! */
Config_Error( LOG_ALERT, "Invalid server name configured in \"%s\" ('ServerName'): Dot missing!", NGIRCd_ConfFile );
if( ! Configtest )
{
Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
exit( 1 );
}
}
#ifdef STRICT_RFC
if( ! Conf_ServerAdminMail[0] )
+30 -38
View File
@@ -16,7 +16,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: conn.c,v 1.122.2.1 2003/04/25 16:50:53 alex Exp $";
static char UNUSED id[] = "$Id: conn.c,v 1.122 2003/04/21 10:52:26 alex Exp $";
#include "imp.h"
#include <assert.h>
@@ -151,7 +151,7 @@ Conn_Exit( VOID )
#ifdef RENDEZVOUS
Rendezvous_UnregisterListeners( );
#endif
/* Sockets schliessen */
for( i = 0; i < Conn_MaxFD + 1; i++ )
{
@@ -183,7 +183,7 @@ Conn_Exit( VOID )
}
}
}
free( My_Connections );
My_Connections = NULL;
Pool_Size = 0;
@@ -217,7 +217,7 @@ Conn_ExitListeners( VOID )
#ifdef RENDEZVOUS
Rendezvous_UnregisterListeners( );
#endif
Log( LOG_INFO, "Shutting down all listening sockets ..." );
for( i = 0; i < Conn_MaxFD + 1; i++ )
{
@@ -240,7 +240,7 @@ Conn_NewListener( CONST UINT Port )
#ifdef RENDEZVOUS
CHAR name[CLIENT_ID_LEN], *info;
#endif
/* Server-"Listen"-Socket initialisieren */
memset( &addr, 0, sizeof( addr ));
addr.sin_family = AF_INET;
@@ -415,7 +415,7 @@ Conn_Handler( VOID )
tv.tv_usec = 0;
if( timeout ) tv.tv_sec = TIME_RES;
else tv.tv_sec = 0;
/* Auf Aktivitaet warten */
i = select( Conn_MaxFD + 1, &read_sockets, &write_sockets, NULL, &tv );
if( i == 0 )
@@ -443,7 +443,7 @@ Conn_Handler( VOID )
/* Es kann geschrieben werden ... */
idx = Socket2Index( i );
if( idx == NONE ) continue;
if( ! Handle_Write( idx ))
{
/* Fehler beim Schreiben! Diesen Socket nun
@@ -899,7 +899,7 @@ New_Connection( INT Sock )
Log( LOG_CRIT, "Can't accept connection: %s!", strerror( errno ));
return;
}
#ifdef USE_TCPWRAP
/* Validate socket using TCP Wrappers */
request_init( &req, RQ_DAEMON, PACKAGE_NAME, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL );
@@ -921,10 +921,10 @@ New_Connection( INT Sock )
if( idx >= Pool_Size )
{
new_size = Pool_Size + CONNECTION_POOL;
/* Im bisherigen Pool wurde keine freie Connection-Struktur mehr gefunden.
* Wenn erlaubt und moeglich muss nun der Pool vergroessert werden: */
if( Conf_MaxConnections > 0 )
{
/* Es ist ein Limit konfiguriert */
@@ -945,7 +945,7 @@ New_Connection( INT Sock )
close( new_sock );
return;
}
/* zunaechst realloc() versuchen; wenn das scheitert, malloc() versuchen
* und Daten ggf. "haendisch" umkopieren. (Haesslich! Eine wirklich
* dynamische Verwaltung waere wohl _deutlich_ besser ...) */
@@ -962,21 +962,21 @@ New_Connection( INT Sock )
close( new_sock );
return;
}
/* Struktur umkopieren ... */
memcpy( ptr, My_Connections, sizeof( CONNECTION ) * Pool_Size );
Log( LOG_DEBUG, "Allocated new connection pool for %ld items (%ld bytes). [malloc()/memcpy()]", new_size, sizeof( CONNECTION ) * new_size );
}
else Log( LOG_DEBUG, "Allocated new connection pool for %ld items (%ld bytes). [realloc()]", new_size, sizeof( CONNECTION ) * new_size );
/* Adjust pointer to new block */
My_Connections = ptr;
/* Initialize new items */
for( idx = Pool_Size; idx < new_size; idx++ ) Init_Conn_Struct( idx );
idx = Pool_Size;
/* Adjust new pool size */
Pool_Size = new_size;
}
@@ -1011,7 +1011,7 @@ New_Connection( INT Sock )
/* Sub-Prozess wurde asyncron gestartet */
My_Connections[idx].res_stat = s;
}
/* Penalty-Zeit setzen */
Conn_SetPenalty( idx, 4 );
} /* New_Connection */
@@ -1142,14 +1142,14 @@ Handle_Buffer( CONN_ID Idx )
if( ! Unzip_Buffer( Idx )) return FALSE;
}
#endif
if( My_Connections[Idx].rdatalen < 1 ) break;
/* Eine komplette Anfrage muss mit CR+LF enden, vgl.
* RFC 2812. Haben wir eine? */
My_Connections[Idx].rbuf[My_Connections[Idx].rdatalen] = '\0';
ptr = strstr( My_Connections[Idx].rbuf, "\r\n" );
if( ptr ) delta = 2;
#ifndef STRICT_RFC
else
@@ -1164,7 +1164,7 @@ Handle_Buffer( CONN_ID Idx )
else if( ptr2 ) ptr = ptr2;
}
#endif
action = FALSE;
if( ptr )
{
@@ -1219,10 +1219,10 @@ Handle_Buffer( CONN_ID Idx )
}
#endif
}
if( action ) result = TRUE;
} while( action );
return result;
} /* Handle_Buffer */
@@ -1348,7 +1348,7 @@ Check_Servers( VOID )
LOCAL VOID
New_Server( INT Server, CONN_ID Idx )
{
/* Establish new server link */
/* Neue Server-Verbindung aufbauen */
struct sockaddr_in new_addr;
struct in_addr inaddr;
@@ -1358,12 +1358,11 @@ New_Server( INT Server, CONN_ID Idx )
assert( Server > NONE );
assert( Idx > NONE );
/* Did we get a valid IP address? */
/* Wurde eine gueltige IP-Adresse gefunden? */
if( ! Conf_Server[Server].ip[0] )
{
/* No. Free connection structure and abort: */
/* Nein. Verbindung wieder freigeben: */
Init_Conn_Struct( Idx );
Conf_Server[Server].conn_id = NONE;
Log( LOG_ERR, "Can't connect to \"%s\" (connection %d): ip address unknown!", Conf_Server[Server].host, Idx );
return;
}
@@ -1378,9 +1377,8 @@ New_Server( INT Server, CONN_ID Idx )
if( inaddr.s_addr == (unsigned)-1 )
#endif
{
/* Can't convert IP address */
/* Konnte Adresse nicht konvertieren */
Init_Conn_Struct( Idx );
Conf_Server[Server].conn_id = NONE;
Log( LOG_ERR, "Can't connect to \"%s\" (connection %d): can't convert ip address %s!", Conf_Server[Server].host, Idx, Conf_Server[Server].ip );
return;
}
@@ -1393,9 +1391,7 @@ New_Server( INT Server, CONN_ID Idx )
new_sock = socket( PF_INET, SOCK_STREAM, 0 );
if ( new_sock < 0 )
{
/* Can't create socket */
Init_Conn_Struct( Idx );
Conf_Server[Server].conn_id = NONE;
Log( LOG_CRIT, "Can't create socket: %s!", strerror( errno ));
return;
}
@@ -1405,11 +1401,9 @@ New_Server( INT Server, CONN_ID Idx )
res = connect( new_sock, (struct sockaddr *)&new_addr, sizeof( new_addr ));
if(( res != 0 ) && ( errno != EINPROGRESS ))
{
/* Can't connect socket */
Log( LOG_CRIT, "Can't connect socket: %s!", strerror( errno ));
close( new_sock );
Init_Conn_Struct( Idx );
Conf_Server[Server].conn_id = NONE;
return;
}
@@ -1417,26 +1411,24 @@ New_Server( INT Server, CONN_ID Idx )
c = Client_NewLocal( Idx, inet_ntoa( new_addr.sin_addr ), CLIENT_UNKNOWNSERVER, FALSE );
if( ! c )
{
/* Can't create new client structure */
close( new_sock );
Init_Conn_Struct( Idx );
Conf_Server[Server].conn_id = NONE;
Log( LOG_ALERT, "Can't establish connection: can't create client structure!" );
return;
}
Client_SetIntroducer( c, c );
Client_SetToken( c, TOKEN_OUTBOUND );
/* Register connection */
/* Verbindung registrieren */
My_Connections[Idx].sock = new_sock;
My_Connections[Idx].addr = new_addr;
strlcpy( My_Connections[Idx].host, Conf_Server[Server].host, sizeof( My_Connections[Idx].host ));
/* Register new socket */
/* Neuen Socket registrieren */
FD_SET( new_sock, &My_Sockets );
FD_SET( new_sock, &My_Connects );
if( new_sock > Conn_MaxFD ) Conn_MaxFD = new_sock;
Log( LOG_DEBUG, "Registered new connection %d on socket %d.", Idx, My_Connections[Idx].sock );
} /* New_Server */
@@ -1539,7 +1531,7 @@ Read_Resolver_Result( INT r_fd )
}
Log( LOG_DEBUG, "Resolver: %s is \"%s\".", My_Connections[i].host, result );
/* Aufraeumen */
close( My_Connections[i].res_stat->pipe[0] );
close( My_Connections[i].res_stat->pipe[1] );
+3 -25
View File
@@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc.c,v 1.120.2.1 2003/04/29 12:20:14 alex Exp $";
static char UNUSED id[] = "$Id: irc.c,v 1.120 2003/03/31 15:54:21 alex Exp $";
#include "imp.h"
#include <assert.h>
@@ -95,30 +95,8 @@ IRC_KILL( CLIENT *Client, REQUEST *Req )
if( c )
{
/* Yes, there is such a client -- but is it a valid user? */
if( Client_Type( c ) == CLIENT_SERVER )
{
if( Client != Client_ThisServer( )) IRC_WriteStrClient( Client, ERR_CANTKILLSERVER_MSG, Client_ID( Client ));
else
{
/* Oops, I should kill another server!? */
Log( LOG_ERR, "Can't KILL server \"%s\"!", Req->argv[0] );
conn = Client_Conn( Client_NextHop( c ));
assert( conn > NONE );
Conn_Close( conn, NULL, "Nick collision for server!?", TRUE );
}
}
else if( Client_Type( c ) != CLIENT_USER )
{
if( Client != Client_ThisServer( )) IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
else
{
/* Oops, what sould I close?? */
Log( LOG_ERR, "Can't KILL \"%s\": invalid client type!", Req->argv[0] );
conn = Client_Conn( Client_NextHop( c ));
assert( conn > NONE );
Conn_Close( conn, NULL, "Collision for invalid client type!?", TRUE );
}
}
if( Client_Type( c ) == CLIENT_SERVER ) IRC_WriteStrClient( Client, ERR_CANTKILLSERVER_MSG, Client_ID( Client ));
else if( Client_Type( c ) != CLIENT_USER )IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
else
{
/* Kill user NOW! */
+2 -4
View File
@@ -1,6 +1,6 @@
#!/bin/sh
# ngIRCd Test Suite
# $Id: getpid.sh,v 1.2.4.1 2003/04/22 20:01:23 alex Exp $
# $Id: getpid.sh,v 1.2 2002/11/10 14:28:06 alex Exp $
# wurde ein Name uebergeben?
[ $# -ne 1 ] && exit 1
@@ -18,9 +18,7 @@ fi
# PID ermitteln
ps $PS_FLAGS > procs.tmp
cat procs.tmp | grep "$1" | awk "{print \$$PS_PIDCOL}" | sort -n > pids.tmp
pid=`head $HEAD_FLAGS pids.tmp`
rm -rf procs.tmp pids.tmp
pid=$( cat procs.tmp | grep "$1" | awk "{print \$$PS_PIDCOL}" | sort -n | head $HEAD_FLAGS )
# ermittelte PID validieren
[ "$pid" -gt 1 ] > /dev/null 2>&1
+2 -2
View File
@@ -1,10 +1,10 @@
#!/bin/sh
# ngIRCd Test Suite
# $Id: stress-server.sh,v 1.6.4.1 2003/04/22 20:01:23 alex Exp $
# $Id: stress-server.sh,v 1.6 2002/09/23 22:07:43 alex Exp $
[ -z "$srcdir" ] && srcdir=`dirname $0`
[ "$1" -gt 0 ] 2> /dev/null && CLIENTS="$1" || CLIENTS=5
[ $1 -gt 0 ] 2> /dev/null && CLIENTS=$1 || CLIENTS=5
name=`basename $0`
test=`echo ${name} | cut -d '.' -f 1`