mirror: Create /run/sync-mirrors directory during boot on CentOS/RHEL 7.
This commit is contained in:
parent
706a2f243d
commit
d479e00de2
1 changed files with 11 additions and 0 deletions
|
@ -59,6 +59,17 @@ class mirror($datadir="/srv/mirrors", $cron=true) {
|
|||
before => Cron["sync-mirrors"],
|
||||
require => User["mirror"],
|
||||
}
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "7") >= 0 {
|
||||
file { "/usr/lib/tmpfiles.d/sync-mirrors.conf":
|
||||
ensure => present,
|
||||
content => "d /run/sync-mirrors 0755 mirror mirror\n",
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
before => Cron["sync-mirrors"],
|
||||
require => User["mirror"],
|
||||
}
|
||||
}
|
||||
|
||||
file { "/usr/local/bin/sync-mirrors":
|
||||
ensure => present,
|
||||
|
|
Loading…
Add table
Reference in a new issue