diff options
author | Jonathan Bauer | 2016-04-19 14:35:49 +0200 |
---|---|---|
committer | Jonathan Bauer | 2016-04-19 14:35:49 +0200 |
commit | bfc46745ca3b9f201c182f5ed464b8ceb70206a8 (patch) | |
tree | 015c65351dc2d87c48651104d00bb05bcb7492a8 /packager | |
parent | minor: gitignore (diff) | |
download | systemd-init-bfc46745ca3b9f201c182f5ed464b8ceb70206a8.tar.gz systemd-init-bfc46745ca3b9f201c182f5ed464b8ceb70206a8.tar.xz systemd-init-bfc46745ca3b9f201c182f5ed464b8ceb70206a8.zip |
(DEFAULT_)RSYNC_OPTS option usage
Diffstat (limited to 'packager')
-rw-r--r-- | packager/openslx.config | 5 | ||||
-rw-r--r-- | packager/openslx.functions | 18 |
2 files changed, 18 insertions, 5 deletions
diff --git a/packager/openslx.config b/packager/openslx.config index 5680295c..f5d28f76 100644 --- a/packager/openslx.config +++ b/packager/openslx.config @@ -1,10 +1,11 @@ -RSYNC_OPTS="--acls \ +DEFAULT_RSYNC_OPTS="--acls \ --hard-links \ --xattrs \ --archive \ --delete \ --delete-excluded \ - --numeric-ids" + --numeric-ids \ + --verbose" # default options used by rsync DEFAULT_RSYNC_RSH="ssh -c arcfour -o StrictHostKeyChecking=no" diff --git a/packager/openslx.functions b/packager/openslx.functions index 138e5f39..89a2a672 100644 --- a/packager/openslx.functions +++ b/packager/openslx.functions @@ -277,16 +277,28 @@ clone_host() { grep '^+' "$FILE" >> "$INCLUDE" done - # prepare rsync's options + # prepare rsync's general options + local RSYNC_OPTS="${DEFAULT_RSYNC_OPTS}" + [ -z "${RSYNC_OPTS}" ] && \ + RSYNC_OPTS=" + --acls \ + --hard-links \ + --xattrs \ + --archive \ + --delete \ + --delete-excluded \ + --numeric-ids + " + # prepare rsync's remote shell options local RSYNC_RSH="$DEFAULT_RSYNC_RSH" - [ -z "$RSYNC_RSH" ] && RSYNC_RSH="ssh -c arcfour -oStrictHostKeyChecking=no" + [ -z "${RSYNC_RSH}" ] && RSYNC_RSH="ssh -c blowfish -oStrictHostKeyChecking=no" local RSYNC_SOURCE="root@$REMOTE_HOST:/" # if something goes wrong during rsync, we need to recreate the .stage4 flag add_cleanup touch ${RSYNC_TARGET}/.stage4 # run rsync with the exclude/include lists created earlier cat "$INCLUDE" "$EXCLUDE" | \ - rsync $RSYNC_OPTS \ + rsync ${RSYNC_OPTS} \ --exclude-from=- \ --rsh "${RSYNC_RSH}" \ "${RSYNC_SOURCE}" \ |