adding a settings('string') get call, so a upstart again operation works again, adding archive to the checkgauge, adding keep_dirs

This commit is contained in:
Axel Kittenberger 2012-11-09 20:15:42 +01:00
parent fe41e18f7b
commit 78fa6208bf
3 changed files with 53 additions and 49 deletions

View File

@ -49,41 +49,38 @@ rsync.checkgauge = {
target = true, target = true,
rsync = { rsync = {
-- rsync binary
binary = true,
_extra = true,
-- rsync shortflags
verbose = true,
quiet = true,
checksum = true,
update = true,
links = true,
copy_links = true,
hard_links = true,
perms = true,
executability = true,
acls = true, acls = true,
xattrs = true, archive = true,
owner = true, binary = true,
group = true, checksum = true,
times = true,
sparse = true,
dry_run = true,
whole_file = true,
one_file_system = true,
prune_empty_dirs = true,
ignore_times = true,
compress = true, compress = true,
copy_links = true,
cvs_exclude = true, cvs_exclude = true,
protect_args = true, dry_run = true,
executability = true,
group = true,
hard_links = true,
ignore_times = true,
ipv4 = true, ipv4 = true,
ipv6 = true, ipv6 = true,
keep_dirlinks = true,
-- further rsync options links = true,
one_file_system = true,
owner = true,
perms = true,
protect_args = true,
prune_empty_dirs = true,
quiet = true,
rsh = true, rsh = true,
rsync_path = true, rsync_path = true,
sparse = true,
temp_dir = true, temp_dir = true,
times = true,
update = true,
verbose = true,
whole_file = true,
xattrs = true,
_extra = true,
}, },
} }
@ -403,31 +400,32 @@ rsync.prepare = function(
local computedN = 2 local computedN = 2
local shortFlags = { local shortFlags = {
verbose = 'v',
quiet = 'q',
checksum = 'c',
update = 'u',
links = 'l',
copy_links = 'L',
hard_links = 'H',
perms = 'p',
executability = 'E',
acls = 'A', acls = 'A',
xattrs = 'X', checksum = 'c',
owner = 'o',
group = 'g',
times = 't',
sparse = 'S',
dry_run = 'n',
whole_file = 'W',
one_file_system = 'x',
prune_empty_dirs = 'm',
ignore_times = 'I',
compress = 'z', compress = 'z',
copy_links = 'L',
cvs_exclude = 'C', cvs_exclude = 'C',
protect_args = 's', dry_run = 'n',
executability = 'E',
group = 'g',
hard_links = 'H',
ignore_times = 'I',
ipv4 = '4', ipv4 = '4',
ipv6 = '6' ipv6 = '6',
keep_dirlinks = 'K',
links = 'l',
one_file_system = 'x',
owner = 'o',
perms = 'p',
protect_args = 's',
prune_empty_dirs = 'm',
quiet = 'q',
sparse = 'S',
times = 't',
update = 'u',
verbose = 'v',
whole_file = 'W',
xattrs = 'X',
} }
local shorts = { '-' } local shorts = { '-' }

View File

@ -100,7 +100,7 @@ default.collect = function( agent, exitcode )
log('Normal', 'Startup of "',agent.source,'" finished.') log('Normal', 'Startup of "',agent.source,'" finished.')
return 'ok' return 'ok'
elseif rc == 'again' then elseif rc == 'again' then
if settings.insist then if settings('insist') then
log( log(
'Normal', 'Normal',
'Retrying startup of "', 'Retrying startup of "',

View File

@ -4332,6 +4332,12 @@ end
-- The Lsyncd 2.1 settings call -- The Lsyncd 2.1 settings call
-- --
function settings( a1 ) function settings( a1 )
-- if a1 is a string this is a get operation
if typeof( a1 ) == 'string' then
return uSettings[ a1 ]
end
-- if its a table it sets all the value of the bale
for k, v in pairs( a1 ) do for k, v in pairs( a1 ) do
if type( k ) ~= 'number' then if type( k ) ~= 'number' then
uSettings[ k ] = v uSettings[ k ] = v