#!/bin/csh -f
#*****************************************************************************
#                                                                            *
#            Copyright (C) 1993, Alias Research, Inc.                        *
#                                                                            *
#    These coded instructions,  statements and  computer programs contain    *
#    unpublished information proprietary to Alias Research, Inc.  and are    *
#    protected by the Canadian and US Federal copyright law. They may not    *
#    be disclosed to third parties  or copied  or duplicated, in whole or    *
#    in part,  without the prior written consent of Alias Research,  Inc.    *
#                                                                            *
# Unpublished-rights reserved under the Copyright Laws of the United States. *
#                                                                            *
#****************************************************************************/
#
#       $Source: /tmp_mnt/repo/root/v/alias3.2.2/src/Gifts/bin/RCS/drender_dellogs.csh.sgi,v $
#       $Author: psantan $ $Date: 93/06/30 16:03:37 $
#
#
#

if (! $?ALIAS_LOCATION ) then
    echo "ALIAS_LOCATION environment variable must be set to install drender"
    exit -1
else
    set NT_DR=${ALIAS_WORKENV}/user_data/demo/misc_data/dhost.pst

    pst ${NT_DR}
    if ( $status == "1" ) then
        exit 1
    endif

    set NT_MACHINES=(`pstget ${NT_DR} '*.hosts' 'all'`)

    umask 000

    pushd ${NT_MASTER_DIR}/log > /dev/null

    if ( "${NT_MACHINES}" == "all" || "${NT_MACHINES}" == "ALL" || "${NT_MACHINES}" == "" ) then
        set NT_FILTER='*'
    else
        set NT_FILTER="${NT_MACHINES}"
    endif

    foreach mach ( ${NT_FILTER} )

        if ( "${mach}" == "localhost" ) then

            set machn=`hostname`
        else

            set machn=${mach}
        endif

        #
        # Delete the log file for the specified machine(s).
        # 
        #

        /bin/rm -f ${NT_MASTER_DIR}/log/${machn}
        echo "Log file for ${machn} deleted."
    end

    popd > /dev/null

endif




