Skip to content
Snippets Groups Projects
Commit a642fcbe authored by Russ Allbery's avatar Russ Allbery
Browse files

Don't attempt to remove logrotate, just disable it

We keep running into other packages that depend on it, which makes
removing it unnecessarily difficult.
parent f31c763f
No related branches found
No related tags found
No related merge requests found
......@@ -9,33 +9,10 @@ class base::newsyslog {
'newsyslog': ensure => present;
}
# Remove or disable logrotate, since otherwise it will fight with newsyslog.
# We can't actually remove it on Red Hat 5 and above because it's required
# by other packages.
case $::operatingsystem {
'debian', 'ubuntu': {
package { 'logrotate': ensure => absent }
}
'redhat': {
if $::lsbdistrelease == '4' {
package {
'logrotate':
ensure => absent;
'conman':
ensure => absent,
before => Package['logrotate'];
}
}
# Even if we weren't able to remove the package, ensure the cron job
# that runs it is gone.
file { '/etc/cron.daily/logrotate': ensure => absent }
}
default: {
}
}
# Disable logrotate, since otherwise it will fight with newsyslog. We could
# try to remove it, but we keep running into programs that depend on it and
# make the removal unnecessarily difficult.
file { '/etc/cron.daily/logrotate': ensure => absent }
# Determine the PID file location for the HUP action in the default messages
# configuration. Red Hat uses syslogd and Debian uses rsyslogd.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment