summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 68d7ae8e9..3e8e04daa 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -249,6 +249,18 @@ sub setAutologin {
{ USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" });
}
+sub rotate_log {
+ my ($f) = @_;
+ if (-e $f) {
+ my $i = 1;
+ for (; -e "$f$i" || -e "$f$i.gz"; $i++) {}
+ rename $f, "$f$i";
+ }
+}
+sub rotate_logs {
+ my ($prefix) = @_;
+ rotate_log("$prefix/root/$_") foreach qw(ddebug.log install.log);
+}
sub writeandclean_ldsoconf {
my ($prefix) = @_;