From 493c1dd8260f24f8bfaf9271418529011b0f2a80 Mon Sep 17 00:00:00 2001
From: Tarik Gasmi
Date: Fri, 6 Jul 2007 10:29:06 +0000
Subject: Actualised LDAP SiteManagement Webinterface and Perl-Config-Skripts
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1225 95ad53e4-c205-0410-b2fa-d234c58c8868
---
ldap-site-mngmt/webinterface/rbs/gbm_change.php | 96 ++++++++++++++++---------
1 file changed, 61 insertions(+), 35 deletions(-)
(limited to 'ldap-site-mngmt/webinterface/rbs/gbm_change.php')
diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_change.php b/ldap-site-mngmt/webinterface/rbs/gbm_change.php
index 86067acd..ff01865d 100644
--- a/ldap-site-mngmt/webinterface/rbs/gbm_change.php
+++ b/ldap-site-mngmt/webinterface/rbs/gbm_change.php
@@ -9,8 +9,11 @@ $rbsDN = $_POST['rbsdn'];
$mnr = $_POST['mnr'];
$sbmnr = $_POST['sbmnr'];
-$rootfstype = $_POST['rootfstype'];
-$oldrootfstype = $_POST['oldrootfstype'];
+$rootfs = $_POST['rootfs'];
+#$oldrootfs = $_POST['oldrootfs'];
+$rootfspath = $_POST['rootfspath'];
+$rootfssuffix = $_POST['rootfssuffix'];
+#$oldrootfstype = $_POST['oldrootfstype'];
$attribs = $_POST['attribs'];
if (count($attribs) != 0){
@@ -92,42 +95,65 @@ if ( $oldgbmcn != "" && $gbmcn == "" ){
}
###################################
-# RootFS Type
-
-if ( $oldrootfstype == $rootfstype ){
- # $mesg = "keine Aenderung
";
-}
-
-if ( $oldrootfstype == "" && $rootfstype != "" ){
- $entryadd ['rootfstype'] = $rootfstype;
- if(ldap_mod_add($ds,$gbmDN,$entryadd)){
- $mesg = "Attribute RootfsType erfolgreich eingetragen
";
- }else{
- $mesg = "Fehler beim eintragen der Attribute RootfsType
";
- }
-}
-
-
-if ( $oldrootfstype != "" && $rootfstype != "" && $oldrootfstype != $rootfstype ){
- echo "Root FS Type ändern
";
- $entrymod ['rootfstype'] = $rootfstype;
- if(ldap_mod_replace($ds,$gbmDN,$entrymod)){
- $mesg = "Attribute RootfsType erfolgreich geaendert
";
- }else{
- $mesg = "Fehler beim aendern der Attribute RootfsType
";
- }
+# RootFS
+if ( $rootfs != "" ){
+ if ( $rootfs == "none" ){
+ echo "Root FS löschen!
";
+ $entrydel ['rootfs'] = array();
+ if(ldap_mod_del($ds,$gbmDN,$entrydel)){
+ $mesg = "Attribut RootFS erfolgreich gelöscht
";
+ }else{
+ $mesg = "Fehler beim löschen des Attributs RootFS
";
+ }
+
+ }else{
+ echo "Root FS ändern!
";
+ $entrymod ['rootfs'] = $rootfs.$rootfssuffix;
+ if(ldap_mod_replace($ds,$gbmDN,$entrymod)){
+ $mesg = "Attribut RootFS erfolgreich geändert
";
+ }else{
+ $mesg = "Fehler beim ändern des Attributs RootFS
";
+ }
+ }
}
+###################################
+# RootFS Type
-if ( $oldrootfstype != "" && $rootfstype == "" ){
- echo "Root FS Type löschen!
";
- $entrydel ['rootfstype'] = array();
- if(ldap_mod_del($ds,$gbmDN,$entrydel)){
- $mesg = "Attribute RootfsType erfolgreich geloescht
";
- }else{
- $mesg = "Fehler beim loeschen der Attribute RootfsType
";
- }
-}
+#if ( $oldrootfstype == $rootfstype ){
+# # $mesg = "keine Aenderung
";
+#}
+
+#if ( $oldrootfstype == "" && $rootfstype != "" ){
+# $entryadd ['rootfstype'] = $rootfstype;
+# if(ldap_mod_add($ds,$gbmDN,$entryadd)){
+# $mesg = "Attribute RootfsType erfolgreich eingetragen
";
+# }else{
+# $mesg = "Fehler beim eintragen der Attribute RootfsType
";
+# }
+#}
+
+
+#if ( $oldrootfstype != "" && $rootfstype != "" && $oldrootfstype != $rootfstype ){
+# echo "Root FS Type ändern
";
+# $entrymod ['rootfstype'] = $rootfstype;
+# if(ldap_mod_replace($ds,$gbmDN,$entrymod)){
+# $mesg = "Attribute RootfsType erfolgreich geaendert
";
+# }else{
+# $mesg = "Fehler beim aendern der Attribute RootfsType
";
+# }
+#}
+
+
+#if ( $oldrootfstype != "" && $rootfstype == "" ){
+# echo "Root FS Type löschen!
";
+# $entrydel ['rootfstype'] = array();
+# if(ldap_mod_del($ds,$gbmDN,$entrydel)){
+# $mesg = "Attribute RootfsType erfolgreich geloescht
";
+# }else{
+# $mesg = "Fehler beim loeschen der Attribute RootfsType
";
+# }
+#}
###################################
--
cgit v1.2.3-55-g7522