--- rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11950-symlinked-logs.patch 2022/04/17 03:49:46 1.1 +++ rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11950-symlinked-logs.patch 2022/04/17 03:56:39 1.2 @@ -45,8 +45,8 @@ diff -Nur --no-dereference e-smith-base- safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"); diff -Nur --no-dereference e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/logrotate-migrate e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate --- e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/logrotate-migrate 1969-12-31 19:00:00.000000000 -0500 -+++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:41:10.852000000 -0400 -@@ -0,0 +1,48 @@ ++++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:54:07.894000000 -0400 +@@ -0,0 +1,50 @@ +#!/bin/bash +# this script is to migrate old symlink log to regular file in order +# to be handled by logrotate @@ -84,7 +84,9 @@ diff -Nur --no-dereference e-smith-base- + mylink=$(readlink "$f") + unlink $f + touch $f -+ cp --attributes-only "$mylink" "$f" ++ if [ -f "$mylink" ]; then ++ cp --attributes-only "$mylink" "$f" ++ fi + found ++ + fi +done