diff -Nur -x '*.orig' -x '*.rej' e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand --- e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2006-02-16 22:52:14.000000000 -0500 +++ mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2007-03-26 15:47:50.000000000 -0400 @@ -1,6 +1,6 @@ #! /usr/bin/perl -w #---------------------------------------------------------------------- -# copyright (C) 2003 Mitel Networks Corporation +# copyright (C) 2003-2007 Mitel Networks Corporation # # 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 @@ -16,8 +16,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# Technical support for this program is available from Mitel Networks -# Please visit our web site www.mitel.com/sme/ for details. #---------------------------------------------------------------------- use strict; @@ -25,7 +23,6 @@ use File::Copy; use esmith::templates; -sub setup_logfile_symlink; sub expand; my $event = shift or die "Event name is required\n"; @@ -36,20 +33,6 @@ my $templates_dir = "/etc/e-smith/events/$event/templates2expand"; exit 0 unless -d $templates_dir; -my $logfile_dir = "/etc/e-smith/events/$event/logfiles2timestamp"; -if (-d $logfile_dir) -{ - # Prepare log rotation if required - chdir $logfile_dir or die "Could not chdir to $logfile_dir: $!\n";; - find({ - no_chdir => 1, - follow => 0, - wanted => \&setup_logfile_symlink, - }, - '.' - ); -} - chdir $templates_dir or die "Could not chdir to $templates_dir: $!\n";; # Walk the tree and expand all templates referenced thereunder. find({ @@ -62,39 +45,6 @@ exit 0; -sub setup_logfile_symlink -{ - return unless -f $_; - s/^\.//; - $filename = $_; - - # Set up filenames to be used by syslog. We first set up symlinks - # with known names, then use the value of the symlink when we - # expand the configuration files - my $time = time(); - - if (-f "${filename}" and ! -l "${filename}") - { - my ($sec,$min,$hour,$mday,$mon,$year) = localtime($time - 1); - my $target = sprintf("%s.%04d%02d%02d%02d%02d%02d", - $filename, $year+1900, $mon+1, $mday, $hour, $min, $sec); - move("${filename}", "${target}") or - die "Could not move ${filename} to " . - "${target}"; - } - my ($sec,$min,$hour,$mday,$mon,$year) = localtime($time); - my $target = sprintf("%s.%04d%02d%02d%02d%02d%02d", - $filename, $year+1900, $mon+1, $mday, $hour, $min, $sec); - - if (-l "${filename}") - { - unlink("${filename}") or - warn "Could not unlink ${filename}"; - } - symlink("${target}", "${filename}") or - warn "Could not symlink ${target} to ${filename}"; -} - sub expand { return unless -f $_;