File: template-ldif2db.pl.in

package info (click to toggle)
389-ds-base 1.4.0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 50,776 kB
  • sloc: ansic: 303,582; python: 59,673; cpp: 10,380; perl: 5,807; sh: 2,654; makefile: 2,457; yacc: 806; xml: 376; lex: 366; java: 50
file content (28 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#{{PERL-EXEC}}
#
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2013 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details. 
# END COPYRIGHT BLOCK
#

use lib qw(/usr/lib64/dirsrv/perl);
use DSUtil qw(shellEscape);

# We lose args that are quoted when passing ARGV to a wrapper
while ($i <= $#ARGV) {
        if($ARGV[$i] =~ /^-/){
                $wrapperArgs[$i] = $ARGV[$i];
        } else {
                $wrapperArgs[$i] = shellEscape($ARGV[$i]);
        }
        $i++;
}

exec "{{SERVERBIN-DIR}}/ldif2db-online @wrapperArgs -Z {{SERV-ID}}";

exit ($?);