|
Lines 38-43
my $do_not_clear_zebraqueue;
Link Here
|
| 38 |
my $length; |
38 |
my $length; |
| 39 |
my $where; |
39 |
my $where; |
| 40 |
my $offset; |
40 |
my $offset; |
|
|
41 |
my $runas_root; |
| 42 |
my $run_user = (getpwuid($<))[0]; |
| 41 |
my $verbose_logging = 0; |
43 |
my $verbose_logging = 0; |
| 42 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
44 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
| 43 |
my $result = GetOptions( |
45 |
my $result = GetOptions( |
|
Lines 45-51
my $result = GetOptions(
Link Here
|
| 45 |
'r|reset' => \$reset, |
47 |
'r|reset' => \$reset, |
| 46 |
's' => \$skip_export, |
48 |
's' => \$skip_export, |
| 47 |
'k' => \$keep_export, |
49 |
'k' => \$keep_export, |
| 48 |
'I|skip-index' => \$skip_index, |
50 |
'I|skip-index' => \$skip_index, |
| 49 |
'nosanitize' => \$nosanitize, |
51 |
'nosanitize' => \$nosanitize, |
| 50 |
'b' => \$biblios, |
52 |
'b' => \$biblios, |
| 51 |
'noxml' => \$noxml, |
53 |
'noxml' => \$noxml, |
|
Lines 60-73
my $result = GetOptions(
Link Here
|
| 60 |
'length:i' => \$length, |
62 |
'length:i' => \$length, |
| 61 |
'offset:i' => \$offset, |
63 |
'offset:i' => \$offset, |
| 62 |
'v+' => \$verbose_logging, |
64 |
'v+' => \$verbose_logging, |
|
|
65 |
'runas-root' => \$runas_root, |
| 63 |
); |
66 |
); |
| 64 |
|
67 |
|
| 65 |
|
|
|
| 66 |
if (not $result or $want_help) { |
68 |
if (not $result or $want_help) { |
| 67 |
print_usage(); |
69 |
print_usage(); |
| 68 |
exit 0; |
70 |
exit 0; |
| 69 |
} |
71 |
} |
| 70 |
|
72 |
|
|
|
73 |
if(not $runas_root && $run_user eq 'root') { |
| 74 |
my $msg = "Warning: You are running this script as the user 'root'.\n"; |
| 75 |
$msg .= "If this is intentional you must explicitly specify this using the -runas-root switch\n"; |
| 76 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
| 77 |
die $msg; |
| 78 |
} |
| 79 |
|
| 71 |
if (not $biblios and not $authorities) { |
80 |
if (not $biblios and not $authorities) { |
| 72 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
81 |
my $msg = "Must specify -b or -a to reindex bibs or authorities\n"; |
| 73 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
82 |
$msg .= "Please do '$0 --help' to see usage.\n"; |
| 74 |
- |
|
|