-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrunCreateConfig
executable file
·80 lines (67 loc) · 1.97 KB
/
runCreateConfig
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /usr/bin/env perl
################################################################################
#
# runCreateConfig
# ---------------
#
# 09/18/2008 Philipp Schieferdecker <[email protected]>
################################################################################
my $dbHost;
my $dbName;
my $dbUser;
my $dbPwrd;
my $masterName;
my $pathList;
my $newName;
my $cmd =
"java " .
"-cp ../ext/ojdbc8.jar:../lib/cmssw-evf-confdb-gui.jar " .
"confdb.db.ConfDBCreateConfig ";
while (@ARGV)
{
my $arg = shift @ARGV;
if ($arg eq "--hltdev")
{
$dbHost = "cmsr1-v.cern.ch";
$dbName = "cms_cond.cern.ch";
$dbUser = "cms_hltdev_writer";
}
elsif ($arg eq "--rcms")
{
$dbHost = "cmsonr1-v.cms";
$dbName = "cms_rcms.cern.ch";
$dbUser = "cms_hlt_w";
}
elsif ($arg eq "--rcms_ssh")
{
$dbHost = "localhost";
$dbName = "cms_rcms.cern.ch";
$dbUser = "cms_hlt_w";
}
elsif ($arg eq "--int2r")
{
$dbHost = "int2r1-v.cern.ch";
$dbName = "int2r_nolb.cern.ch";
$dbUser = "cms_hlt_writer";
}
elsif ($arg eq "--int9r")
{
$dbHost = "int9r1-v.cern.ch";
$dbName = "int9r_nolb.cern.ch";
$dbUser = "cms_hlt_writer";
}
elsif ($arg eq "--dbpwrd") { $dbPwrd = shift @ARGV; }
elsif ($arg eq "--master") { $masterName = shift @ARGV; }
elsif ($arg eq "--paths") { $pathList = shift @ARGV; }
elsif ($arg eq "--name") { $newName = shift @ARGV; }
}
die "no db specified (--hltdev / --rcms / --rcms_ssh)" if ($dbHost eq "");
die "no password specified (--dbpwrd)" if ($dbPwrd eq "");
die "no master specified (--master)" if ($masterName eq "");
die "no path-list specified (--paths)" if ($pathList eq "");
die "no name specified (--name)" if ($newName eq "");
$cmd = $cmd .
"-h $dbHost -d $dbName -u $dbUser -s $dbPwrd " .
"-m $masterName --paths $pathList -n $newName";
print $cmd . "\n";
system($cmd);