From 6026de62754c5ba6210793fde5ed882365af418d Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 1 Feb 2008 15:37:15 +0000 Subject: [PATCH] Removed cloning behaviour of hardware detection. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8733 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/SIPackages.pm | 82 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/gosa-si/modules/SIPackages.pm b/gosa-si/modules/SIPackages.pm index 1d3213a91..9924be37f 100644 --- a/gosa-si/modules/SIPackages.pm +++ b/gosa-si/modules/SIPackages.pm @@ -927,47 +927,47 @@ sub hardware_config { &main::daemon_log("gotoHardwareChecksum $gotoHardwareChecksum was added to LDAP", 4); } - # Look if there another host with this checksum to use the hardware config - $mesg = $ldap->search( - base => $ldap_base, - scope => 'sub', - filter => "(&(objectClass=GOhard)(gotoHardwareChecksum=$gotoHardwareChecksum))" - ); - - if($mesg->count>1) { - my $clone_entry= $mesg->entry(0); - $entry->changetype("modify"); - foreach my $attribute ( - "gotoSndModule", "ghNetNic", "gotoXResolution", "ghSoundAdapter", "ghCpuType", "gotoXkbModel", - "ghGfxAdapter", "gotoXMousePort", "ghMemSize", "gotoXMouseType", "ghUsbSupport", "gotoXHsync", - "gotoXDriver", "gotoXVsync", "gotoXMonitor") { - my $value= $clone_entry->get_value($attribute); - if(defined($value)) { - if(defined($entry->get_value($attribute))) { - $entry->delete($attribute); - } - &main::daemon_log("Adding attribute $attribute with value $value",1); - $entry->add($attribute => $value); - } - } - foreach my $attribute ( - "gotoModules", "ghScsiDev", "ghIdeDev") { - my $array= $clone_entry->get_value($attribute, 'as_ref' => 1); - if(defined($array)) { - if(defined($entry->get_value($attribute))) { - $entry->delete($attribute); - } - foreach my $array_entry (@{$array}) { - $entry->add($attribute => $array_entry); - } - } - - } - if($entry->update($ldap)) { - &main::daemon_log("Added Hardware configuration to LDAP", 4); - } - - } + ## Look if there another host with this checksum to use the hardware config + #$mesg = $ldap->search( + # base => $ldap_base, + # scope => 'sub', + # filter => "(&(objectClass=GOhard)(gotoHardwareChecksum=$gotoHardwareChecksum))" + #); + + #if($mesg->count>1) { + # my $clone_entry= $mesg->entry(0); + # $entry->changetype("modify"); + # foreach my $attribute ( + # "gotoSndModule", "ghNetNic", "gotoXResolution", "ghSoundAdapter", "ghCpuType", "gotoXkbModel", + # "ghGfxAdapter", "gotoXMousePort", "ghMemSize", "gotoXMouseType", "ghUsbSupport", "gotoXHsync", + # "gotoXDriver", "gotoXVsync", "gotoXMonitor") { + # my $value= $clone_entry->get_value($attribute); + # if(defined($value)) { + # if(defined($entry->get_value($attribute))) { + # $entry->delete($attribute); + # } + # &main::daemon_log("Adding attribute $attribute with value $value",1); + # $entry->add($attribute => $value); + # } + # } + # foreach my $attribute ( + # "gotoModules", "ghScsiDev", "ghIdeDev") { + # my $array= $clone_entry->get_value($attribute, 'as_ref' => 1); + # if(defined($array)) { + # if(defined($entry->get_value($attribute))) { + # $entry->delete($attribute); + # } + # foreach my $array_entry (@{$array}) { + # $entry->add($attribute => $array_entry); + # } + # } + + # } + # if($entry->update($ldap)) { + # &main::daemon_log("Added Hardware configuration to LDAP", 4); + # } + + #} } -- 2.30.2