Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
3823c4c6
Commit
3823c4c6
authored
Sep 04, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Sep 04, 2014
Browse files
Fixes
#2619
fusiondirectory-insert-schema should have a -c option to continue on error
parent
bdf01cdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/bin/fusiondirectory-insert-schema
View file @
3823c4c6
...
...
@@ -35,6 +35,7 @@ my $listschemas = 0;
my
$modify
=
0
;
my
$schemalist
=
0
;
my
$pathunset
=
1
;
my
$continue
=
0
;
my
@schemas
=
();
my
@gen_files
=
();
foreach
my
$arg
(
@ARGV
)
{
...
...
@@ -47,6 +48,8 @@ foreach my $arg ( @ARGV ) {
$schemalist
=
1
;
}
elsif
((
lc
(
$arg
)
eq
'
-l
')
||
(
lc
(
$arg
)
eq
'
--list
'))
{
$listschemas
=
1
;
}
elsif
((
lc
(
$arg
)
eq
'
-c
')
||
(
lc
(
$arg
)
eq
'
--continue
'))
{
$continue
=
1
;
}
elsif
((
lc
(
$arg
)
eq
'
-m
')
||
(
lc
(
$arg
)
eq
'
--modify
'))
{
if
(
$schemalist
)
{
usage
();
...
...
@@ -119,6 +122,8 @@ if (scalar(@schemas) == 0) {
$path
=
"";
}
$continue
++
;
# activating continue feature only for insertions
foreach
my
$schema
(
@schemas
)
{
my
$schema_name
=
"";
...
...
@@ -230,8 +235,12 @@ sub remove_ldifs
sub
die_with_error
{
my
(
$error
)
=
@_
;
remove_ldifs
();
die
$error
;
if
(
$continue
==
2
)
{
print
"
Error:
$error
\n
Continuing…
\n
";
}
else
{
remove_ldifs
();
die
$error
;
}
}
sub
list_schemas
...
...
bmortier
@bmortier
mentioned in issue
#888 (moved)
·
Sep 02, 2017
mentioned in issue
#888 (moved)
mentioned in issue #888
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment