aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mirror/templates/mirrordir
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-01-18 18:21:44 +0000
committerNicolas Vigier <boklm@mageia.org>2011-01-18 18:21:44 +0000
commit190661a90103736dcdd528128481f98d55060e24 (patch)
tree709440810bc64c8ef52dcaa8cc66ac44cf1186bb /modules/mirror/templates/mirrordir
parent93bd861c2be2883af5ad9b7c3476efc167383b53 (diff)
downloadpuppet-190661a90103736dcdd528128481f98d55060e24.tar
puppet-190661a90103736dcdd528128481f98d55060e24.tar.gz
puppet-190661a90103736dcdd528128481f98d55060e24.tar.bz2
puppet-190661a90103736dcdd528128481f98d55060e24.tar.xz
puppet-190661a90103736dcdd528128481f98d55060e24.zip
add mirrordir script and mirrorbootstrap class
Diffstat (limited to 'modules/mirror/templates/mirrordir')
-rw-r--r--modules/mirror/templates/mirrordir12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/mirror/templates/mirrordir b/modules/mirror/templates/mirrordir
new file mode 100644
index 00000000..85b54389
--- /dev/null
+++ b/modules/mirror/templates/mirrordir
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+remoteurl="<%= remoteurl%>"
+localdir="<%= localdir %>"
+rsync_options="<%= rsync_options %>"
+lockfile="<%= lockfile %>"
+
+test -f "$lockfile" && exit
+touch "$lockfile"
+/usr/bin/rsync $rsync_options "$remoteurl" "$localdir"
+rm -f "$lockfile"
+