# vim: syntax=sh # $Id: defaults.in,v 1.134 2006/07/23 13:16:27 vanbaal Exp $ # # Copyright (C) 2000-2003 Stichting LogReport Foundation LogReport@LogReport.org # # This file is part of Lire. # # Lire 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. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program (see COPYING); if not, check with # http://www.gnu.org/copyleft/gpl.html. # # Replacement for test -nt which isn't supported # by Solaris' test (like if this was surprising...) lr_test_nt () { file1=$1 file2=$2 @PERL@ -e 'exit( (stat($ARGV[0]))[9] > (stat($ARGV[1]))[9] ? 0 : 1 )' $file1 $file2 } ######################################################################## # Runtime check for DocBook DTD # # Workaround for RH platforms where the path to DBK always change. # Anyway, this is really the proper way to locate XML DTDs. ######################################################################## runtime_docbook_dtd_check () { if test -z "$lr_dbk_xml_dtd" -o ! -f "$lr_dbk_xml_dtd" then if test -x "$xmlcatalog_path" -a -f /etc/xml/catalog then DTD=`$xmlcatalog_path /etc/xml/catalog "-//OASIS//DTD DocBook XML V4.1.2//EN" || true` if echo "$DTD" |grep '^file://' > /dev/null 2>/dev/null then lr_dbk_xml_dtd=`echo "$DTD" | sed -e 's|^file://||'` fi fi fi LR_DBK_XML_DTD="$lr_dbk_xml_dtd" } setup_archive_vars () { # LR_FAILEDDIR is used by lr_spool only LR_FAILEDDIR="$lr_archive_dir/email/raw/failed" export LR_FAILEDDIR } root_check () { if test -x /usr/xpg4/bin/id then # solaris' /usr/bin/id doesn't grok -u # don't you just love it... runid=/usr/xpg4/bin/id else runid=id fi if test -z "$lr_test_uid" then if test "`$runid -u`" -eq 0 -o "`$runid -ru`" -eq 0 then cat >&2 <