#!/bin/sh
#----------------------------------------------------------------------------
# /var/install/bin/pre-setup-system-logfileview-menu
#
# Creation: 2011-05-08 hbfl
# Last Update: $Id: pre-setup-doc-docu-menu 19861 2009-05-30 12:24:51Z hbfl
#
# Copyright (c) 2001-2011 the eisfair team, team(at)eisfair(dot)org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------
. /var/install/include/eislib
. /etc/config.d/base
#exec 2> /tmp/server-logfile-trace$$
#set -x
# ---------------------------------------------------------------------------
# get logfile target from base config file
# ---------------------------------------------------------------------------
get_logfile_entry ()
{
show_target=''
# build target list in $logfiles
idx=1
while [ ${idx} -le ${SYSLOGD_DEST_N} ]
do
eval active='${SYSLOGD_DEST_'${idx}'_ACTIVE}'
if [ "${active}" = "yes" ]
then
eval target='${SYSLOGD_DEST_'${idx}'_TARGET}'
# check for @IP-address values
if echo "${target}" | grep -qv '^@'
then
# check for devices like /dev/console
if echo "${target}" | grep -qv '^/dev/'
then
if [ -z "${show_target}" ]
then
show_target="${target}"
else
show_target="${show_target} ${target}"
fi
fi
fi
fi
idx=$(/usr/bin/expr ${idx} + 1 )
done
}
# ---------------------------------------------------------------------------
# create logfile view entry
# ---------------------------------------------------------------------------
create_logfile_view_menu ()
{
{
for l_file in ${show_target}
do
l_mesg=$(basename "${l_file}")
l_file=`echo "${l_file}" | sed 's#\*#\\\*#g'`
echo "