[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-bak2db.pl, 1.5, 1.6 template-db2bak.pl, 1.4, 1.5 template-db2index.pl, 1.5, 1.6 template-db2ldif.pl, 1.4, 1.5 template-ldif2db.pl, 1.4, 1.5 template-ns-accountstatus.pl, 1.4, 1.5 template-ns-activate.pl, 1.4, 1.5 template-ns-inactivate.pl, 1.4, 1.5
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Fri Oct 13 01:06:29 UTC 2006
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23608/ldap/admin/src/scripts
Modified Files:
template-bak2db.pl template-db2bak.pl template-db2index.pl
template-db2ldif.pl template-ldif2db.pl
template-ns-accountstatus.pl template-ns-activate.pl
template-ns-inactivate.pl
Log Message:
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
1) introduced these 3 new config attributes:
nsslapd-lockdir, nsslapd-tmpdir, nsslapd-certdir,
and eliminated: nsslapd-instancedir.
2) replaced the hardcoded paths with the corresponding attribute value in the
server as well as in the create/remove instance codes.
3) moved snmp stats file to the nsslapd-tmpdir
4) moved the server instance dir to <prefix>/lib/<brand>-ds/slapd-<id>
Index: template-bak2db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-bak2db.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-bak2db.pl 19 Apr 2005 22:07:00 -0000 1.5
+++ template-bak2db.pl 13 Oct 2006 01:06:21 -0000 1.6
@@ -55,7 +55,7 @@
$archivedir = "";
$dbtype = "ldbm database";
$instance = "";
-$dsroot = "{{DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$mydsroot = "{{MY-DS-ROOT}}";
$verbose = 0;
$rootdn = "";
@@ -127,7 +127,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2bak.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2bak.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-db2bak.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -53,8 +53,8 @@
$taskname = "";
$archivedir = "";
$dbtype = "ldbm database";
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
+$mybakdir = "{{BAK-DIR}}";
$verbose = 0;
$rootdn = "";
$passwd = "";
@@ -105,7 +105,7 @@
$mn++; $yr += 1900;
$taskname = "backup_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($archivedir eq "") {
- $archivedir = "${mydsroot}{{SEP}}bak{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
+ $archivedir = "${bakdir}{{SEP}}bak{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
}
$dn = "dn: cn=$taskname, cn=backup, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
@@ -115,7 +115,7 @@
$entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2index.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2index.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2index.pl 25 Aug 2005 21:17:48 -0000 1.5
+++ template-db2index.pl 13 Oct 2006 01:06:21 -0000 1.6
@@ -65,8 +65,7 @@
$vlvattribute_arg = "";
$verbose = 0;
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$i = 0;
while ($i <= $#ARGV)
@@ -163,11 +162,11 @@
$indexes_list="";
$vlvattribute="";
$vlvindexes_list="";
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
if ( $attribute_arg eq "" && $vlvattribute_arg eq "" )
{
# Get the list of indexes from the entry
- $indexes_list="$dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
+ $indexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
"-b \"cn=index,cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"(&(objectclass=*)(nsSystemIndex=false))\" cn";
# build the values of the attribute nsIndexAttribute
@@ -187,7 +186,7 @@
}
# Get the list of indexes from the entry
- $vlvindexes_list="$dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
+ $vlvindexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
# build the values of the attribute nsIndexVlvAttribute
open(LDAP1, "$vlvindexes_list |");
@@ -220,6 +219,6 @@
$nsinstance = "nsInstance: ${instance}\n";
$entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2ldif.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2ldif.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-db2ldif.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -100,8 +100,9 @@
$taskname = "";
$ldiffile = "";
$doreplica = 0;
-$dsroot = "{{DS-ROOT}}";
-$mydsroot = "{{MY-DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
+$ldifdir = "{{LDIF-DIR}}";
+$servid = "{{SERV-ID}}";
$verbose = 0;
$rootdn = "";
$passwd = "";
@@ -195,7 +196,7 @@
$mn++; $yr += 1900;
$taskname = "export_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($ldiffile eq "") {
- $ldiffile = "${mydsroot}{{SEP}}ldif{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+ $ldiffile = "${ldifdir}{{SEP}}${servid}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
}
$dn = "dn: cn=$taskname, cn=export, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
@@ -241,7 +242,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${nsnobase64}${nsnowrap}${nsnoversion}${nsnouniqueid}${nsuseid2entry}${nsonefile}${nsexportdecrypt}${nsprintkey}${nsldiffile}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-ldif2db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ldif2db.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ldif2db.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ldif2db.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -93,7 +93,7 @@
$genuniqid = "time";
$uniqidname = "";
$taskname = "";
-$dsroot = "{{DS-ROOT}}";
+$prefix = "{{DS-ROOT}}";
$mydsroot = "{{MY-DS-ROOT}}";
$verbose = 0;
$rootdn = "";
@@ -219,7 +219,7 @@
$entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}${nsnoattrindexes}${nsimportencrypt}${nsmergechunksiz}${nsgenuniqid}${nsuniqidname}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
-chdir("$dsroot{{SEP}}shared{{SEP}}bin");
-open(FOO, "| $dsroot{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+chdir("$prefix{{SEP}}shared{{SEP}}bin");
+open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-ns-accountstatus.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-accountstatus.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-accountstatus.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-accountstatus.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
Index: template-ns-activate.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-activate.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-activate.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-activate.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
Index: template-ns-inactivate.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-inactivate.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-inactivate.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-inactivate.pl 13 Oct 2006 01:06:21 -0000 1.5
@@ -356,7 +356,7 @@
###############################
# Generated variable
-$dsroot="{{DS-ROOT}}";
+$prefix="{{DS-ROOT}}";
# Determine which command we are running
if ( $0 =~ /ns-inactivate(.pl)?$/ )
@@ -392,7 +392,7 @@
debug("Running ** $cmd ** $operation\n");
-$dsbinroot="$dsroot{{SEP}}shared{{SEP}}bin";
+$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin";
$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1";
$ldapmodify="$dsbinroot{{SEP}}ldapmodify";
More information about the Fedora-directory-commits
mailing list