Log()
{
- echo "$1" | tee -a $LOGFILE
+ /bin/echo "$1" | tee -a $LOGFILE
}
MakeTarball()
then
stopsrc -s inetd >>$LOGFILE 2>&1
fi
- elif [ "$PLATFORM" = openbsd ]
+ elif [ "$PLATFORM" = "openbsd" ]
then
- true
+ ps axo pid,comm | grep $i > /tmp/tmppsout
+ if [ -s /tmp/tmppsout ]
+ then
+ awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
+ sleep 2
+ fi
+ elif [ "$PLATFORM" = "freebsd" ]
+ then
+ ps axo pid,comm | grep $i > /tmp/tmppsout
+ if [ -s /tmp/tmppsout ]
+ then
+ awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
+ sleep 2
+ fi
+ elif [ "$PLATFORM" = "netbsd" ]
+ then
+ ps axo pid,comm | grep $i > /tmp/tmppsout
+ if [ -s /tmp/tmppsout ]
+ then
+ awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f
+ sleep 2
+ fi
+ elif [ "$PLATFORM" = "linux" ]
+ then
+ ps axo pid,comm | grep $i > /tmp/tmppsout
+ if [ -s /tmp/tmppsout ]
+ then
+ awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f
+ sleep 2
+ fi
else
ps -ef | grep $i | grep -v grep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
OLDPWD=`pwd`
cd /
- if [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ]
+ if [ "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ]
then
/usr/sbin/inetd -s
+ elif [ "$PLATFORM" = "sun" ]
+ then
+ /usr/sbin/svcadm refresh svc:/network/inetd:default
+ /usr/sbin/svcadm restart svc:/network/inetd:default
elif [ "$PLATFORM" = "aix" ]
then
startsrc -s inetd >>$LOGFILE 2>&1
/usr/sbin/inetd
elif [ "$PLATFORM" = "openbsd" ]
then
- true
+ /etc/rc.d/inetd start >/dev/null
+ elif [ "$PLATFORM" = "freebsd" ]
+ then
+ /etc/rc.d/inetd onestart
+ elif [ "$PLATFORM" = "netbsd" ]
+ then
+ /etc/rc.d/inetd start >/dev/null
+ elif [ "$PLATFORM" = "linux" ]
+ then
+ /etc/init.d/openbsd-inetd start >/dev/null 2>&1
else
#ifdef hpV4
/usr/sbin/inetd
elif [ $BUILDSYSTEM = "Linux" ];
then
PLATFORM="linux"
- PLATFORM_SCRIPT_DIR=""
+ PLATFORM_SCRIPT_DIR="linux"
+ elif [ $BUILDSYSTEM = "FreeBSD" ];
+ then
+ PLATFORM="freebsd"
+ PLATFORM_SCRIPT_DIR="freebsd"
elif [ $BUILDSYSTEM = "OpenBSD" ];
then
PLATFORM="openbsd"
- PLATFORM_SCRIPT_DIR=""
+ PLATFORM_SCRIPT_DIR="openbsd"
+ elif [ $BUILDSYSTEM = "NetBSD" ];
+ then
+ PLATFORM="netbsd"
+ PLATFORM_SCRIPT_DIR="netbsd"
else # Build system = HP
PLATFORM=hp-ux
PLATFORM_SCRIPT_DIR=hp
if [ "$PLATFORM" = "aix" ];
then
USER=`/bin/whoami`
- elif [ "$PLATFORM" = "sun" -o "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ];
+ elif [ "$PLATFORM" = "usl" -o "$PLATFORM" = "uxp" ];
then
USER=`/usr/ucb/whoami`
else