diff options
author | Tarik Gasmi | 2007-06-07 19:49:06 +0200 |
---|---|---|
committer | Tarik Gasmi | 2007-06-07 19:49:06 +0200 |
commit | b9d2bd338f68aace2eb9e999896a787014ac7e46 (patch) | |
tree | c17514d270e5e01c22f1ffdb54bed6789efaba4b /ldap-site-mngmt/webinterface/computers/host_change.php | |
parent | * fixed incorrectly generated exportURI (still used the export-name instead (diff) | |
download | core-b9d2bd338f68aace2eb9e999896a787014ac7e46.tar.gz core-b9d2bd338f68aace2eb9e999896a787014ac7e46.tar.xz core-b9d2bd338f68aace2eb9e999896a787014ac7e46.zip |
Aktuelle Version LDAP-Site-Mngmt Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1156 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers/host_change.php')
-rw-r--r-- | ldap-site-mngmt/webinterface/computers/host_change.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php index 71c005fa..f54e149d 100644 --- a/ldap-site-mngmt/webinterface/computers/host_change.php +++ b/ldap-site-mngmt/webinterface/computers/host_change.php @@ -146,13 +146,15 @@ if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){ echo "MAC aendern<br>"; # hier noch Syntaxcheck $entry['hwaddress'] = $mac; + $pxemac = str_replace (":","-",$mac); + $pxeoldmac = str_replace (":","-",$oldmac); $result = ldap_mod_replace($ds,$hostDN,$entry); if($result){ # in den PXEs auch ändern $pxes = get_pxeconfigs($hostDN,array("dn","filename")); if ( count($pxes) != 0 ){ foreach ($pxes as $pxe){ - $entrynewmac ['filename'] = "01-".$mac; + $entrynewmac ['filename'] = "01-".$pxemac; ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); } } @@ -164,15 +166,15 @@ if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){ foreach ($pxes as $pxe){ if (count($pxe['filename']) > 1){ for ($i=0; $i<count($pxe['filename']); $i++){ - if ($pxe['filename'][$i] == $oldmac){ - $entrynewmac ['filename'][$i] = "01-".$mac; + if ($pxe['filename'][$i] == $pxeoldmac){ + $entrynewmac ['filename'][$i] = "01-".$pxemac; }else{ $entrynewmac ['filename'][$i] = $pxe['filename'][$i]; } } } - if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $oldmac){ - $entrynewmac ['filename'] = "01-".$mac; + if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $pxeoldmac){ + $entrynewmac ['filename'] = "01-".$pxemac; } ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); } |