summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3990219)
raw | patch | inline | side by side (parent: 3990219)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 May 2010 12:23:56 +0000 (12:23 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 May 2010 12:23:56 +0000 (12:23 +0000) |
For the removal of debconf configuration use the
prepare_to_save_FAI_object (which respects CoW) and
fix some bugs that would have prevented its usage.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18612 594d385d-05f5-0310-b6e9-bd551577e9d8
prepare_to_save_FAI_object (which respects CoW) and
fix some bugs that would have prevented its usage.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18612 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_FAI.inc b/trunk/gosa-plugins/fai/admin/fai/class_FAI.inc
index c3005f198be79b6f83cc2ce2fffda6aecd5f79eb..2b3d1a0b5eba2e9e63665109e042aff055990ded 100644 (file)
/* Ldap search for fai classes specified in this release */
$ldap->cd($fai_base);
- $ldap->search("(objectClass=FAIclass)",array("dn","objectClass","FAIstate"));
+ $ldap->search("(|(objectClass=FAIclass)(objectClass=FAIdebconfInfo))",array("dn","objectClass","FAIstate"));
/* check the returned objects, and add/replace them in our return variable */
while($attr = $ldap->fetch()){
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 7f40c58b622ca2f8f96ce3bf2cb7aa12f3b9a4ff..c0114568aab192844a91429f03e9d619435b6b80 100644 (file)
$ldap->cd($this->dn);
foreach($to_del as $dn){
/* Only delete subobjects of the current FAI class */
- $cn = $ldap->getCn($dn);
- $ldap->search("cn=$cn", array('dn'));
+ $ldap->cd($this->dn);
+ $ldap->search("(|(objectClass=FAIclass)(objectClass=FAIdebconfInfo))", array('dn'));
if ($ldap->count()){
while($attrs = $ldap->fetch()){
if ($attrs['dn'] == $dn) {
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index fb7ad0902621e56bc79161da4b2d2e330ecb04ff..9bf75f59808807ce078fd9f5a2eefc507a51a572 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cat($dn);
if ($ldap->count()) {
- $ldap->cd($dn);
- $ldap->rmdir($dn);
+ FAI::prepare_to_save_FAI_object($dn,array(),true);
}
}
}
$ldap = $this->config->get_ldap_link();
$ldap->cat($pkgdn);
if ($ldap->count()) {
- $ldap->cd($pkgdn);
- $ldap->rmdir($pkgdn);
+ FAI::prepare_to_save_FAI_object($pkgdn,array(),true);
}
else {
unset($this->ConfiguredPackages[$pkgname][$name]);