45 |
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"); |
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"); |
46 |
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 |
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 |
47 |
--- 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.old/root/etc/e-smith/events/actions/logrotate-migrate 1969-12-31 19:00:00.000000000 -0500 |
48 |
+++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:41:10.852000000 -0400 |
+++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:54:07.894000000 -0400 |
49 |
@@ -0,0 +1,48 @@ |
@@ -0,0 +1,50 @@ |
50 |
+#!/bin/bash |
+#!/bin/bash |
51 |
+# this script is to migrate old symlink log to regular file in order |
+# this script is to migrate old symlink log to regular file in order |
52 |
+# to be handled by logrotate |
+# to be handled by logrotate |
84 |
+ mylink=$(readlink "$f") |
+ mylink=$(readlink "$f") |
85 |
+ unlink $f |
+ unlink $f |
86 |
+ touch $f |
+ touch $f |
87 |
+ cp --attributes-only "$mylink" "$f" |
+ if [ -f "$mylink" ]; then |
88 |
|
+ cp --attributes-only "$mylink" "$f" |
89 |
|
+ fi |
90 |
+ found ++ |
+ found ++ |
91 |
+ fi |
+ fi |
92 |
+done |
+done |