/
reconfig.coretag
39 lines (34 loc) · 1.16 KB
/
reconfig.coretag
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
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2002-2007 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
UserTag reconfig Order name table file
UserTag reconfig Version 1.5
UserTag reconfig Routine <<EOR
use strict;
sub {
my ($name, $table, $file) = @_;
$name ||= $Vend::Cfg->{CatalogName};
my $myname = $Vend::Cfg->{CatalogName};
#::logGlobal("Trying to reconfig $name");
if($myname ne '_mv_admin' and $myname ne $name) {
$::Values{mv_error_tag_restart} =
"Not authorized to reconfig that catalog.";
return undef;
}
#::logGlobal("Passed name check on reconfig $name");
my $script = $Global::Catalog{$name}->{script};
unless($script) {
logGlobal("Attempt to reconfigure catalog without script?");
logError("Attempt to reconfigure catalog without script?");
return undef;
}
if($table and $file) {
$script = join "\t", $script, $table, $file;
}
logData("$Global::RunDir/reconfig", $script);
return 1;
}
EOR