adding rsync chmod parameter

This commit is contained in:
Axel Kittenberger 2016-12-01 14:12:56 +01:00
parent b71089b12e
commit c58658e642
3 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,6 @@
??-??-????: ??-??-????:
enhancement: add rsync options: enhancement: add rsync options:
"chmod",
"chown", "chown",
"copy_dirlinks", "copy_dirlinks",
"existing", "existing",

View File

@ -58,6 +58,7 @@ rsync.checkgauge = {
bwlimit = true, bwlimit = true,
checksum = true, checksum = true,
chown = true, chown = true,
chmod = true,
compress = true, compress = true,
copy_dirlinks = true, copy_dirlinks = true,
copy_links = true, copy_links = true,
@ -490,6 +491,12 @@ rsync.prepare =
computedN = computedN + 1 computedN = computedN + 1
end end
if crsync.chmod
then
computed[ computedN ] = '--chmod=' .. crsync.chmod
computedN = computedN + 1
end
if crsync.chown if crsync.chown
then then
computed[ computedN ] = '--chown=' .. crsync.chown computed[ computedN ] = '--chown=' .. crsync.chown

View File

@ -15,15 +15,18 @@
-- --
-- --
if not default then if not default
then
error( 'default not loaded' ); error( 'default not loaded' );
end end
if not default.rsync then if not default.rsync
then
error( 'default.rsync not loaded' ); error( 'default.rsync not loaded' );
end end
if default.rsyncssh then if default.rsyncssh
then
error( 'default-rsyncssh already loaded' ); error( 'default-rsyncssh already loaded' );
end end
@ -31,6 +34,7 @@ end
-- rsyncssh extends default.rsync -- rsyncssh extends default.rsync
-- --
local rsyncssh = { default.rsync } local rsyncssh = { default.rsync }
default.rsyncssh = rsyncssh default.rsyncssh = rsyncssh
-- --