mirror of https://github.com/schoebel/mars
marsadm: prevent mutual overwrite of delete symlinks
Add an (unused) host context. Previously, concurrent log-delete operations triggered by cron could lead to unnecessary loss of deletetion symlinks.
This commit is contained in:
parent
c379a5e88f
commit
216ecbffde
|
@ -3918,6 +3918,7 @@ static const struct light_class light_classes[] = {
|
|||
.cl_len = 7,
|
||||
.cl_type = 'l',
|
||||
.cl_serial = true,
|
||||
.cl_hostcontext = false, // ignore context, although present
|
||||
.cl_father = CL_GLOBAL_TODO,
|
||||
.cl_prepare = prepare_delete,
|
||||
},
|
||||
|
|
|
@ -1091,7 +1091,7 @@ sub _create_delete {
|
|||
}
|
||||
}
|
||||
}
|
||||
my $new = sprintf("$mars/todo-global/delete-%09d", ++$delete_nr);
|
||||
my $new = sprintf("$mars/todo-global/delete-%09d-$host", ++$delete_nr);
|
||||
lprint "create symlink $new -> $target\n";
|
||||
set_link($target, $new);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue