Date: Sat, 15 Apr 1995 18:02:02 +0700 From: Serge Goncharov <joker@avangard.master.nsk.su> To: ache@astral.msk.su Subject: Gabriel patch for FreeBSD 2.0 Message-ID: <199504151102.SAA09249@avangard.master.nsk.su> Resent-Message-ID: <GGjt-ZlCo3@astral.msk.su>
index | next in thread | raw e-mail
diff --new-file -P -r -c ../../gabriel-1.0/Makefile ./Makefile
*** ../../gabriel-1.0/Makefile Thu Apr 6 10:02:54 1995
--- ./Makefile Thu Apr 13 20:57:03 1995
***************
*** 9,14 ****
--- 9,15 ----
sol1-compile = cc -g -D__sol1__ $(dbg-flags)
#sol2-compile = on latsol2 gcc -g $(dbg-flags)
sol2-compile = gcc -g -D__sol2__ $(dbg-flags)
+ freebsd-compile = gcc -g -D__freebsd__ $(dbg-flags)
# If you can execute the pwd command with your make program
# put it here.
***************
*** 18,34 ****
sol1/list.o sol1/copyright.o
client_sol2_objects = sol2/gabriel_client.o sol2/hostrec.o \
sol2/list.o sol2/copyright.o
!
all:
@echo "Gabriel comes with pre-compiled binaries, so"
@echo "you do not need to re-make them."
@echo "Just following the directions in the gabriel.8 man page."
! @echo "Type \"nroff -man gabriel.8\" to display it.
! @echo " "
@echo "If you want to make Gabriel from sources, then:"
@echo "On a solaris 1 system type 'make solaris1'"
@echo "On a solaris 2 system type 'make solaris2'"
solaris1: sol1 gabriel_client.sol1
--- 19,37 ----
sol1/list.o sol1/copyright.o
client_sol2_objects = sol2/gabriel_client.o sol2/hostrec.o \
sol2/list.o sol2/copyright.o
! client_freebsd_objects = Freebsd/gabriel_client.o Freebsd/hostrec.o \
! Freebsd/list.o Freebsd/copyright.o
all:
@echo "Gabriel comes with pre-compiled binaries, so"
@echo "you do not need to re-make them."
@echo "Just following the directions in the gabriel.8 man page."
! @echo "Type \"nroff -man gabriel.8\" to display it."
! @echo " "
@echo "If you want to make Gabriel from sources, then:"
@echo "On a solaris 1 system type 'make solaris1'"
@echo "On a solaris 2 system type 'make solaris2'"
+ @echo "On FreeBSD system type 'make freebsd'"
solaris1: sol1 gabriel_client.sol1
***************
*** 38,50 ****
--- 41,57 ----
gabriel_client.sol2: sol2
+ freebsd: Freebsd gabriel_client.freebsd
+
clean:
rm -rf sol1
rm -rf sol2
+ rm -rf Freebsd
# rm -f gabriel_client.sol1 gabriel_client.sol2
rm -f client_error_log client_uname_info syslog_slice
rm -f *.crontab
rm -f *~ core
+ rm -f gabriel_client.freebsd
sol1:
mkdir $@
***************
*** 52,84 ****
--- 59,108 ----
sol2:
mkdir $@
+ Freebsd:
+ mkdir $@
+
sol1/gabriel_client.o: gabriel_client.c
cd sol1 ; $(sol1-compile) -c $(cwd)/$<
sol2/gabriel_client.o: gabriel_client.c
cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+ Freebsd/gabriel_client.o: gabriel_client.c
+ cd Freebsd ; $(freebsd-compile) -c $(cwd)/gabriel_client.c
+
sol1/hostrec.o: hostrec.c
cd sol1 ; $(sol1-compile) -c $(cwd)/$<
sol2/hostrec.o: hostrec.c
cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+ Freebsd/hostrec.o: hostrec.c
+ cd Freebsd ; $(freebsd-compile) -c $(cwd)/hostrec.c
+
sol1/list.o: list.c
cd sol1 ; $(sol1-compile) -c $(cwd)/$<
sol2/list.o: list.c
cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+ Freebsd/list.o: list.c
+ cd Freebsd ; $(freebsd-compile) -c $(cwd)/list.c
+
sol1/copyright.o: copyright.c
cd sol1 ; $(sol1-compile) -c $(cwd)/$<
sol2/copyright.o: copyright.c
cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+ Freebsd/copyright.o: copyright.c
+ cd Freebsd ; $(freebsd-compile) -c $(cwd)/copyright.c
+
gabriel_client.sol1: $(client_sol1_objects)
$(sol1-compile) -o gabriel_client.sol1 $(client_sol1_objects)
gabriel_client.sol2: $(client_sol2_objects)
$(sol2-compile) -o gabriel_client.sol2 $(client_sol2_objects)
+ gabriel_client.freebsd: $(client_freebsd_objects)
+ $(freebsd-compile) -o gabriel_client.freebsd $(client_freebsd_objects)
diff --new-file -P -r -c ../../gabriel-1.0/PATCH ./PATCH
*** ../../gabriel-1.0/PATCH Thu Jan 1 07:00:00 1970
--- ./PATCH Fri Apr 14 16:19:02 1995
***************
*** 0 ****
--- 1,125 ----
+ diff --new-file -P -r -c ../../gabriel-1.0/Makefile ./Makefile
+ *** ../../gabriel-1.0/Makefile Thu Apr 6 10:02:54 1995
+ --- ./Makefile Thu Apr 13 20:57:03 1995
+ ***************
+ *** 9,14 ****
+ --- 9,15 ----
+ sol1-compile = cc -g -D__sol1__ $(dbg-flags)
+ #sol2-compile = on latsol2 gcc -g $(dbg-flags)
+ sol2-compile = gcc -g -D__sol2__ $(dbg-flags)
+ + freebsd-compile = gcc -g -D__freebsd__ $(dbg-flags)
+
+ # If you can execute the pwd command with your make program
+ # put it here.
+ ***************
+ *** 18,34 ****
+ sol1/list.o sol1/copyright.o
+ client_sol2_objects = sol2/gabriel_client.o sol2/hostrec.o \
+ sol2/list.o sol2/copyright.o
+ !
+
+ all:
+ @echo "Gabriel comes with pre-compiled binaries, so"
+ @echo "you do not need to re-make them."
+ @echo "Just following the directions in the gabriel.8 man page."
+ ! @echo "Type \"nroff -man gabriel.8\" to display it.
+ ! @echo " "
+ @echo "If you want to make Gabriel from sources, then:"
+ @echo "On a solaris 1 system type 'make solaris1'"
+ @echo "On a solaris 2 system type 'make solaris2'"
+
+ solaris1: sol1 gabriel_client.sol1
+
+ --- 19,37 ----
+ sol1/list.o sol1/copyright.o
+ client_sol2_objects = sol2/gabriel_client.o sol2/hostrec.o \
+ sol2/list.o sol2/copyright.o
+ ! client_freebsd_objects = Freebsd/gabriel_client.o Freebsd/hostrec.o \
+ ! Freebsd/list.o Freebsd/copyright.o
+
+ all:
+ @echo "Gabriel comes with pre-compiled binaries, so"
+ @echo "you do not need to re-make them."
+ @echo "Just following the directions in the gabriel.8 man page."
+ ! @echo "Type \"nroff -man gabriel.8\" to display it."
+ ! @echo " "
+ @echo "If you want to make Gabriel from sources, then:"
+ @echo "On a solaris 1 system type 'make solaris1'"
+ @echo "On a solaris 2 system type 'make solaris2'"
+ + @echo "On FreeBSD system type 'make freebsd'"
+
+ solaris1: sol1 gabriel_client.sol1
+
+ ***************
+ *** 38,50 ****
+ --- 41,57 ----
+
+ gabriel_client.sol2: sol2
+
+ + freebsd: Freebsd gabriel_client.freebsd
+ +
+ clean:
+ rm -rf sol1
+ rm -rf sol2
+ + rm -rf Freebsd
+ # rm -f gabriel_client.sol1 gabriel_client.sol2
+ rm -f client_error_log client_uname_info syslog_slice
+ rm -f *.crontab
+ rm -f *~ core
+ + rm -f gabriel_client.freebsd
+
+ sol1:
+ mkdir $@
+ ***************
+ *** 52,84 ****
+ --- 59,108 ----
+ sol2:
+ mkdir $@
+
+ + Freebsd:
+ + mkdir $@
+ +
+ sol1/gabriel_client.o: gabriel_client.c
+ cd sol1 ; $(sol1-compile) -c $(cwd)/$<
+
+ sol2/gabriel_client.o: gabriel_client.c
+ cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+
+ + Freebsd/gabriel_client.o: gabriel_client.c
+ + cd Freebsd ; $(freebsd-compile) -c $(cwd)/gabriel_client.c
+ +
+ sol1/hostrec.o: hostrec.c
+ cd sol1 ; $(sol1-compile) -c $(cwd)/$<
+
+ sol2/hostrec.o: hostrec.c
+ cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+
+ + Freebsd/hostrec.o: hostrec.c
+ + cd Freebsd ; $(freebsd-compile) -c $(cwd)/hostrec.c
+ +
+ sol1/list.o: list.c
+ cd sol1 ; $(sol1-compile) -c $(cwd)/$<
+
+ sol2/list.o: list.c
+ cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+
+ + Freebsd/list.o: list.c
+ + cd Freebsd ; $(freebsd-compile) -c $(cwd)/list.c
+ +
+ sol1/copyright.o: copyright.c
+ cd sol1 ; $(sol1-compile) -c $(cwd)/$<
+
+ sol2/copyright.o: copyright.c
+ cd sol2 ; $(sol2-compile) -c $(cwd)/$<
+
+ + Freebsd/copyright.o: copyright.c
+ + cd Freebsd ; $(freebsd-compile) -c $(cwd)/copyright.c
+ +
+ gabriel_client.sol1: $(client_sol1_objects)
+ $(sol1-compile) -o gabriel_client.sol1 $(client_sol1_objects)
+
+ gabriel_client.sol2: $(client_sol2_objects)
+ $(sol2-compile) -o gabriel_client.sol2 $(client_sol2_objects)
+
+ + gabriel_client.freebsd: $(client_freebsd_objects)
+ + $(freebsd-compile) -o gabriel_client.freebsd $(client_freebsd_objects)
diff --new-file -P -r -c ../../gabriel-1.0/gabriel_client ./gabriel_client
*** ../../gabriel-1.0/gabriel_client Thu Apr 6 04:33:06 1995
--- ./gabriel_client Wed Apr 12 17:20:53 1995
***************
*** 37,48 ****
PATH=/bin:/usr/bin:/usr/5bin:/usr/sbin:.
ostype=`uname`
! if [ $ostype != "SunOS" ]; then
! echo "The $ostype operating system is not supported."
! exit
! fi
- osver=`uname -r`
case $osver in
4.*)
# echo Solaris 1: $ostype $osver
--- 37,51 ----
PATH=/bin:/usr/bin:/usr/5bin:/usr/sbin:.
ostype=`uname`
! case $ostype in
! "SunOS") osver=`uname -r`
! ;;
! "FreeBSD") osver=freebsd
! ;;
! *) echo "The $ostype operating system is not supported."
! exit
! esac
case $osver in
4.*)
# echo Solaris 1: $ostype $osver
***************
*** 51,56 ****
--- 54,61 ----
5.*)
# echo Solaris 2: $ostype $osver
suffix=sol2
+ ;;
+ freebsd) suffix=freebsd
;;
*)
echo The $osver release of $ostype is not supported.
diff --new-file -P -r -c ../../gabriel-1.0/gabriel_client.c ./gabriel_client.c
*** ../../gabriel-1.0/gabriel_client.c Thu Apr 6 04:33:09 1995
--- ./gabriel_client.c Thu Apr 13 23:20:07 1995
***************
*** 1,4 ****
! /* LAT's Gabriel network probe (e.g., SATAN) detector.
*
* Module: Top level of client probe monitor.
* Author: Dr. Robert W. Baldwin.
--- 1,4 ----
! /*
*
* Module: Top level of client probe monitor.
* Author: Dr. Robert W. Baldwin.
***************
*** 26,32 ****
/* Define this to enable debugging messages. */
#define GABRIEL_CLIENT_DEBUG
! /* #define GABRIEL_PROBE_DEBUG */
/* Forward references. */
--- 26,32 ----
/* Define this to enable debugging messages. */
#define GABRIEL_CLIENT_DEBUG
! #define GABRIEL_PROBE_DEBUG
/* Forward references. */
***************
*** 35,40 ****
--- 35,42 ----
extern void do_solaris2();
extern void parse_sol2_pkt();
extern void record_probe();
+ extern void do_freebsd();
+ extern void parse_freebsd_pkt();
extern void check_threshold();
extern void probe_checker();
extern void log_probing();
***************
*** 101,106 ****
--- 103,114 ----
{
do_solaris2(argc, argv);
}
+ } else if (0 == strcmp(suffix, ".freebsd"))
+ {
+ while (1)
+ {
+ do_freebsd(argc, argv);
+ }
} else
{
(void)printf("%s: Unacceptable program suffix.\n",
***************
*** 175,181 ****
{
(void)printf("%s: Cannot spawn packet filter.\n",
program_name);
! perror("/usr/etc/etherfind");
exit(1);
}
--- 183,189 ----
{
(void)printf("%s: Cannot spawn packet filter.\n",
program_name);
! perror("/usr/sbin/snoop");
exit(1);
}
***************
*** 195,200 ****
--- 203,249 ----
}
+ /* Look for network probe signature on FreeBSD.
+ */
+ void
+ do_freebsd(argc, argv)
+ int argc;
+ char *argv[];
+ {
+ FILE *pkt_filter;
+ char linebuf[LINEBUF_SIZE];
+ char *src_host, *service; /* Ptrs within linebuf. */
+
+
+ /* Keep lint happy. */
+ (void) argc;
+ (void) argv;
+
+ pkt_filter = popen(FREEBSD_POPEN_ARG, "r");
+ if (pkt_filter == NULL)
+ {
+ (void)printf("%s: Cannot spawn packet filter.\n",
+ program_name);
+ perror("/usr/sbin/tspdump");
+ exit(1);
+ }
+
+ while (1)
+ {
+ if (NULL == fgets(linebuf, LINEBUF_SIZE, pkt_filter))
+ {
+ (void)printf("%s: The packet filter terminated.\n",
+ program_name);
+ pclose(pkt_filter);
+ return;
+ }
+ parse_freebsd_pkt(linebuf, &src_host, &service);
+ record_probe(src_host, service);
+ check_threshold();
+ }
+ }
+
+
/* Parse a packet filter line to extract
* the source host and service being probed.
* For now we do not care about the destination host.
***************
*** 378,383 ****
--- 427,531 ----
*servicep = service;
}
+ /* Parse a packet filter line to extract
+ * the source host and service being probed.
+ * For now we do not care about the destination host.
+ * The linebuf is modified by adding nulls and
+ * the src_hostp and servicep pointers are set to
+ * the appropriate places within linebuf.
+ * The results might be symbolic ("telnet") or
+ * numeric ("23") ascii strings.
+ * If the line is inappropriate, src_hostp is set to NULL.
+ */
+ void
+ parse_freebsd_pkt(linebuf, src_hostp, servicep)
+ char *linebuf;
+ char **src_hostp; /* Returned */
+ char **servicep; /* Returned */
+ {
+ char *host;
+ char *p, *rest, *s;
+ int i;
+
+
+ /* Handle bogus lines. */
+ *src_hostp = "";
+ *servicep = "";
+
+ /* Host name is the second word.
+ * This would all be easy to do in perl, but one of
+ * the design rules is to avoid perl.
+ */
+ for (host = linebuf, i = 1 ; i > 0 ; i--)
+ {
+ for ( ; *host != ' ' ; host++)
+ {
+ if (*host == 0)
+ return;
+ }
+ host++;
+ }
+
+ /* Strip the source port number from host name.
+ * ICMP packets do not have source port numbers.
+ */
+ /* Advance p to the end of the host field. */
+ for (p = host ; *p != ' ' ; p++)
+ {
+ if (*p == 0)
+ return;
+ }
+ rest = &(p[1]);
+
+ s = strstr(linebuf, "icmp:") ;
+
+ if ( s == NULL )
+ { /* Skip back to the last dot and change it to a null. */
+ for ( ; *p != '.' ; p--)
+ {
+ if (*p == 0)
+ return;
+ }
+ }
+ *p++ = 0;
+
+ if ( s != NULL )
+ {
+ p = SERVICE_PING;
+ } else
+ {
+ /* The service is last part of the forhth word.
+ */
+ /* Advance p over two more spaces. */
+ p = rest;
+ for (i = 2 ; i > 0 ; i--)
+ {
+ for ( ; *p != ' ' ; p++)
+ {
+ if (*p == 0)
+ return;
+ }
+ p++;
+ }
+
+ *--p = 0; /* Terminate the service. */
+ /* Backup to just after the last dot. */
+ for ( p-- ; *p != '.' ; p--)
+ {
+ if (*p == 0)
+ return;
+ }
+ p++;
+
+ /* strip ":" */
+ s = index(p, ':');
+ if ( s != NULL )
+ *s = 0;
+ }
+
+ *src_hostp = host;
+ *servicep = p;
+ }
/* Record a probe in the database.
* For each source host track the most recent event
diff --new-file -P -r -c ../../gabriel-1.0/gabriel_client.h ./gabriel_client.h
*** ../../gabriel-1.0/gabriel_client.h Thu Apr 6 04:27:16 1995
--- ./gabriel_client.h Thu Apr 13 18:25:52 1995
***************
*** 98,103 ****
--- 98,120 ----
or ip dst port 30000 \
*/
+ /* Arguments to the FreeBSD BPF filter.
+ */
+ #define FREEBSD_POPEN_ARG \
+ "/usr/sbin/tcpdump -v -l 2>&1 \
+ tcp[13] = 2 \
+ or icmp[0] = 8 \
+ or dst port sunrpc \
+ or dst port 1 \
+ or dst port 10 \
+ or dst port 100 \
+ or dst port 1000 \
+ or dst port 5000 \
+ or dst port 10000 \
+ or dst port 20000 \
+ or dst port 30000 \
+ "
+
/* Ignore Solaris 1 pkts line that do not start with
* one of these words.
*/
diff --new-file -P -r -c ../../gabriel-1.0/gabriel_server ./gabriel_server
*** ../../gabriel-1.0/gabriel_server Thu Apr 6 13:09:05 1995
--- ./gabriel_server Wed Apr 12 17:19:17 1995
***************
*** 44,53 ****
####################
initialize () {
! LOG_FILE="/var/adm/gabriel.log"
! CONFIG_FILE="/etc/gabriel.conf"
- LOGGER="/usr/ucb/logger"
PRIORITY="local3"
IDENTIFIER="gabriel"
--- 44,61 ----
####################
initialize () {
! ostype=`uname`
! case $ostype in
! "FreeBSD") LOG_FILE="/var/log/gabriel.log"
! CONFIG_FILE="/usr/local/etc/gabriel.conf"
! LOGGER="/usr/bin/logger"
! ;;
! *) LOG_FILE="/var/adm/gabriel.log"
! CONFIG_FILE="/etc/gabriel.conf"
! LOGGER="/usr/ucb/logger"
! ;;
! esac
PRIORITY="local3"
IDENTIFIER="gabriel"
***************
*** 230,236 ****
##############################
PROGRAM=$0
! PATH="/bin:/usr/bin"
initialize
# parse arguments
--- 238,244 ----
##############################
PROGRAM=$0
! PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
initialize
# parse arguments
diff --new-file -P -r -c ../../gabriel-1.0/gabriel_tester ./gabriel_tester
*** ../../gabriel-1.0/gabriel_tester Thu Apr 6 07:34:56 1995
--- ./gabriel_tester Wed Apr 12 17:33:51 1995
***************
*** 12,30 ****
echo ""
ostype=`uname`
! if [ $ostype != "SunOS" ]; then
! echo "The $ostype operating system is not supported."
! exit
! fi
- osver=`uname -r`
case $osver in
4.*)
suffix=sol1
;;
5.*)
suffix=sol2
;;
*)
echo The $osver release of $ostype is not supported.
exit
--- 12,38 ----
echo ""
ostype=`uname`
! case $ostype in
! "SunOS") osver=`uname -r`
! ;;
! "FreeBSD") osver=freebsd
! ;;
! *) echo "The $ostype operating system is not supported."
! exit
! ;;
! esac
case $osver in
4.*)
+ # echo Solaris 1: $ostype $osver
suffix=sol1
;;
5.*)
+ # echo Solaris 2: $ostype $osver
suffix=sol2
;;
+ freebsd) suffix=freebsd
+ ;;
*)
echo The $osver release of $ostype is not supported.
exit
***************
*** 37,49 ****
echo Probing host $host
# Determine name of ping program.
if [ -f /usr/sbin/ping ]; then
pingpgm=/usr/sbin/ping
fi
if [ -f /usr/etc/ping ]; then
pingpgm=/usr/etc/ping
fi
! $pingpgm $host 2>&1 > /dev/null
if test $? != "0"
then
echo Host $host is not responding
--- 45,68 ----
echo Probing host $host
# Determine name of ping program.
+ if [ -f /sbin/ping ] ; then
+ pingpgm=/sbin/ping
+ fi
if [ -f /usr/sbin/ping ]; then
pingpgm=/usr/sbin/ping
fi
if [ -f /usr/etc/ping ]; then
pingpgm=/usr/etc/ping
fi
!
! # I need to use packets count in FreeBSD
! case $ostype in
! "FreeBSD" ) ping_flag="-c"
! maxpings=1
! ;;
! *) ;;
! esac
! $pingpgm $ping_flag $maxpings $host 2>&1 > /dev/null
if test $? != "0"
then
echo Host $host is not responding
***************
*** 67,73 ****
maxpings=100
echo "Sending $maxpings pings to flush buffers on solaris 2 clients."
i=0
! while /bin/true
do
i=`expr $i + 1`
$pingpgm $host 2>&1 > /dev/null
--- 86,101 ----
maxpings=100
echo "Sending $maxpings pings to flush buffers on solaris 2 clients."
i=0
! case $ostype in
! "FreeBSD") trueprg=/usr/bin/true
! $pingpgm $ping_flag $maxpings $host 2>&1 > /dev/null
! exit
! ;;
! *) trueprg=/bin/true
! ;;
! esac
!
! while $trueprg
do
i=`expr $i + 1`
$pingpgm $host 2>&1 > /dev/null
diff --new-file -P -r -c ../../gabriel-1.0/hostrec.c ./hostrec.c
*** ../../gabriel-1.0/hostrec.c Thu Apr 6 07:13:21 1995
--- ./hostrec.c Wed Apr 12 15:52:10 1995
***************
*** 11,17 ****
--- 11,19 ----
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
+ #ifndef __freebsd__
#include <malloc.h>
+ #endif
#include "gabriel_client.h"
#include "hostrec.h"
diff --new-file -P -r -c ../../gabriel-1.0/install_gabriel_clients ./install_gabriel_clients
*** ../../gabriel-1.0/install_gabriel_clients Thu Apr 6 06:54:26 1995
--- ./install_gabriel_clients Thu Apr 13 19:45:20 1995
***************
*** 29,36 ****
# Gabriel will be installed in the first directory below
# if it exists, otherwise in the second one.
! dstdir1="/usr/local"
! dstdir2="/usr"
gabdir="gabriel-1.0"
dstdir=$dstdir1
srcdir=`pwd`
--- 29,48 ----
# Gabriel will be installed in the first directory below
# if it exists, otherwise in the second one.
!
! ostype=`uname`
! case $ostype in
! "SunOS") dstdir1="/usr/local"
! dstdir2="/usr"
! syspid="/etc/syslog.pid"
! ;;
! "FreeBSD") dstdir1="/usr/local/lib"
! dstdir2="/usr/local"
! syspid="/var/run/syslog.pid"
! ;;
! *) echo "The $ostype operating system is not supported."
! exit
! esac
gabdir="gabriel-1.0"
dstdir=$dstdir1
srcdir=`pwd`
***************
*** 73,79 ****
errfile="./client_error_log"
osfile="./client_uname_info"
syslog="/etc/syslog.conf"
- syspid="/etc/syslog.pid"
systag="local3.info"
sysdst="@$server"
sysslice="./syslog_slice"
--- 85,90 ----
***************
*** 86,92 ****
$rm -rf $errfile $sysslice
echo $systag\ \ $sysdst > $sysslice
! while /bin/true
do
echo " "
echo "Enter the name of a client host or control-D if done."
--- 97,103 ----
$rm -rf $errfile $sysslice
echo $systag\ \ $sysdst > $sysslice
! while true
do
echo " "
echo "Enter the name of a client host or control-D if done."
***************
*** 108,114 ****
echo "the .rhosts file for roots home directory."
continue
fi
! if grep SunOS $osfile >/dev/null
then
echo
else
--- 119,126 ----
echo "the .rhosts file for roots home directory."
continue
fi
!
! if grep 'SunOS\|FreeBSD' $osfile >/dev/null
then
echo
else
diff --new-file -P -r -c ../../gabriel-1.0/install_gabriel_server ./install_gabriel_server
*** ../../gabriel-1.0/install_gabriel_server Thu Apr 6 10:35:19 1995
--- ./install_gabriel_server Fri Apr 14 14:34:59 1995
***************
*** 36,48 ****
initialize () {
INSTALLED_FROM=`pwd`
! LOG_FILE="/var/adm/gabriel.log"
! CONFIG_FILE="/etc/gabriel.conf"
SYSLOG_CONF_FILE="/etc/syslog.conf"
! if [ -d /usr/local ] ; then
! GABRIEL_HOME="/usr/local/gabriel-1.0"
else
! GABRIEL_HOME="/usr/gabriel-1.0"
fi
if [ -x /usr/ucb/echo ] ; then
echo_n="/usr/ucb/echo -n"
--- 36,59 ----
initialize () {
INSTALLED_FROM=`pwd`
! ostype=`uname`
! case $ostype in
! "FreeBSD") LOG_FILE="/var/log/gabriel.log"
! CONFIG_FILE="/usr/local/etc/gabriel.conf"
! ;;
! *) LOG_FILE="/var/adm/gabriel.log"
! CONFIG_FILE="/etc/gabriel.conf"
! ;;
! esac
SYSLOG_CONF_FILE="/etc/syslog.conf"
! if [ -d /usr/local/lib ] ; then
! GABRIEL_HOME="/usr/local/lib/gabriel-1.0"
else
! if [ -d /usr/local ] ; then
! GABRIEL_HOME="/usr/local/gabriel-1.0"
! else
! GABRIEL_HOME="/usr/gabriel-1.0"
! fi
fi
if [ -x /usr/ucb/echo ] ; then
echo_n="/usr/ucb/echo -n"
***************
*** 161,166 ****
--- 172,180 ----
cp -p $_NEW $SYSLOG_CONF_FILE
echo "# following line added for gabriel" >> $SYSLOG_CONF_FILE
echo "local3.info $LOG_FILE" >> $SYSLOG_CONF_FILE
+ if [ -f /var/run/syslog.pid ] ; then
+ kill -HUP `cat /var/run/syslog.pid`
+ fi
if [ -f /etc/syslogd.pid ] ; then
kill -HUP `cat /etc/syslogd.pid`
fi
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504151102.SAA09249>
