Code

* Created "old" branch and moved stuff
[gosa.git] / branches / old / gosa-plugins / goto / admin / systems / goto / class_terminalGeneric.inc
1 <?php
3 class termgeneric extends plugin
4 {
5   /* Generic terminal attributes */
6   var $gotoMode= "locked";
7   var $gotoTerminalPath= "";
8   var $gotoSwapServer= "";
9   var $gotoSyslogServer= "";
10   var $gotoSyslogServers = array();
11   var $gotoNtpServer= array();
12   var $gotoNtpServers= array();
13   var $gotoSndModule= "";
14   var $gotoFloppyEnable= "";
15   var $gotoCdromEnable= "";
16   var $ghCpuType= "-";
17   var $ghMemSize= "-";
18   var $ghUsbSupport= "-";
19   var $ghNetNic= array();
20   var $ghIdeDev= array();
21   var $ghScsiDev= array();
22   var $ghGfxAdapter= "-";
23   var $ghSoundAdapter= "-";
24   var $gotoLastUser= "-";
25   var $netConfigDNS;
26   
27   /* Needed values and lists */
28   var $base= "";
29   var $cn= "";
30   var $description= "";
31   var $orig_dn= "";
32   var $orig_cn= "";
33   var $orig_base= "";
35   var $inheritTimeServer = true;
37   /* Plugin side filled */
38   var $modes= array();
40   /* attribute list for save action */
41   var $ignore_account= TRUE;
42   var $attributes= array("gotoMode", "gotoTerminalPath", 
43       "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
44       "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
45       "ghCpuType", "ghMemSize","ghUsbSupport", "description",
46       "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
47   var $objectclasses= array("top", "gotoTerminal", "GOhard");
49   var $validActions   = array("reboot" => "", "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
51   var $fai_activated = FALSE;
52   var $view_logged = FALSE;
54   var $member_of_ogroup = FALSE;
56   var $kerberos_key_service = NULL;
59   function termgeneric (&$config, $dn= NULL, $parent= NULL)
60   {
61     /* Check if FAI is activated */
62     $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
63     if(!empty($tmp)){
64       $this->fai_activated = TRUE;
65     }
67     plugin::plugin ($config, $dn, $parent);
69     if(class_available("krbHostKeys")){
70       $this->kerberos_key_service = new krbHostKeys($this->config,$this);
71     }
73     if(!isset($this->parent->by_object['ogroup'])){
74       $ldap = $this->config->get_ldap_link();
75       $ldap->cd ($this->config->current['BASE']);
76       $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
77       $this->member_of_ogroup = $ldap->count() >= 1;
78     }
80     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
81     /* Read arrays */
82     foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
83       if (!isset($this->attrs[$val])){
84         continue;
85       }
86       for ($i= 0; $i<$this->attrs[$val]['count']; $i++){
87         array_push($this->$val, $this->attrs[$val][$i]);
88       }
89     }
91     /* Create used ntp server array */
92     $this->gotoNtpServer= array();
93     if(isset($this->attrs['gotoNtpServer'])){
94       $this->inheritTimeServer = false;
95       for($i = 0 ; $i < $this->attrs['gotoNtpServer']['count']; $i++ ){
96         $server = $this->attrs['gotoNtpServer'][$i];
97         $this->gotoNtpServer[$server] = $server;
98       }
99     }
101     /* Set inherit checkbox state */
102     if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
103       $this->inheritTimeServer = true;
104       $this->gotoNtpServer=array();
105     }
107     /* You can't inherit the NTP service, if we are not member in an object group */
108     if(!$this->member_of_ogroup){
109       $this->inheritTimeServer = FALSE;
110     }
112     /* Create available ntp options */
113     $this->gotoNtpServers = $this->config->data['SERVERS']['NTP'];
114     foreach($this->gotoNtpServers as $key => $server){
115       if($server == "default"){
116         unset($this->gotoNtpServers[$key]);
117       }
118     }
120     $this->modes["locked"]= _("Locked");
121     $this->modes["active"]= _("Activated");
123     /* Set base */
124     if ($this->dn == "new"){
125       $ui= get_userinfo();
126       $this->base= dn2base($ui->dn);
127     } else {
128       $this->base= preg_replace ("/^[^,]+,".normalizePreg(get_ou("terminalou"))."/", "", $this->dn);
129     }
131     /* Create an array of all Syslog servers */
132     $tmp = $this->config->data['SERVERS']['SYSLOG'];
133     foreach($tmp as $server){
134       $visible = $server;
135       if($server == "default" && $this->member_of_ogroup) {
136         $visible = "["._("inherited")."]";
137       }
138       $this->gotoSyslogServers[$server] = $visible;
139     }
141     $this->orig_dn= $this->dn;
142     $this->orig_cn= $this->cn;
143     $this->orig_base= $this->base;
144   }
146   function set_acl_base($base)
147   {
148     plugin::set_acl_base($base);
149     $this->netConfigDNS->set_acl_base($base);
150   }
152   function set_acl_category($cat)
153   {
154     plugin::set_acl_category($cat);
155     $this->netConfigDNS->set_acl_category($cat);
156   }
158   function execute()
159   {
160     /* Call parent execute */
161     plugin::execute();
163     if($this->is_account && !$this->view_logged){
164       $this->view_logged = TRUE;
165       new log("view","terminal/".get_class($this),$this->dn);
166     }
168     /* Do we need to flip is_account state? */
169     if (isset($_POST['modify_state'])){
170       $this->is_account= !$this->is_account;
171     }
173     if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate") && isset($this->validActions[$_POST['saction']])){
174       $action = $_POST['saction'];
176       /* Check if we have an DaemonEvent for this action */
177       if(class_available("DaemonEvent_".$action)){
178         $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
179         if(isset($events['TRIGGERED']["DaemonEvent_".$action])){
180           $evt = $events['TRIGGERED']["DaemonEvent_".$action];
181           $tmp = new $evt['CLASS_NAME']($this->config);
182           $tmp->add_targets(array($this->netConfigDNS->macAddress));
183           $tmp->set_type(TRIGGERED_EVENT);
184           $o_queue = new gosaSupportDaemon();
185           if(!$o_queue->append($tmp)){
186             msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
187           }
188         }
189       }else{
190         msg_dialog::display(_("Event error"),
191                     sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
192       }
194     }
196     /* Base select dialog */
197     $once = true;
198     foreach($_POST as $name => $value){
199       if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
200         $once = false;
201         $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
202         $this->dialog->setCurrentBase($this->base);
203       }
204     }
206     /* Dialog handling */
207     if(is_object($this->dialog)){
208       /* Must be called before save_object */
209       $this->dialog->save_object();
211       if($this->dialog->isClosed()){
212         $this->dialog = false;
213       }elseif($this->dialog->isSelected()){
215         /* A new base was selected, check if it is a valid one */
216         $tmp = $this->get_allowed_bases();
217         if(isset($tmp[$this->dialog->isSelected()])){
218           $this->base = $this->dialog->isSelected();
219         }
220         $this->dialog= false;
221       }else{
222         return($this->dialog->execute());
223       }
224     }
226     /* Do we represent a valid terminal? */
227     if (!$this->is_account && $this->parent === NULL){
228       $display= "<img alt=\"\" src=\"images/small-error.png\" align=middle>&nbsp;<b>".
229         msgPool::noValidExtension(_("terminal"))."</b>";
230       return($display);
231     }
233     /* Add new ntp Server to our list */
234     if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){
235       $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
236     }
238     /* Delete selected NtpServer for list of used servers  */
239     if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){
240       foreach($_POST['gotoNtpServerSelected'] as $name){
241         unset($this->gotoNtpServer[$name]);
242       } 
243     }
245     /* Fill templating stuff */
246     $smarty= get_smarty();
247     
248     $tmp = $this->plInfo();
249     foreach($tmp['plProvidedAcls'] as $name => $translation){
250       $smarty->assign($name."ACL",$this->getacl($name));
251     }
253     $smarty->assign("cn", $this->cn);
254     $smarty->assign("description", $this->description);
255     $smarty->assign("staticAddress", "");
257     $smarty->assign("bases", $this->get_allowed_bases());
259     /* tell smarty the inherit checkbox state */
260     $smarty->assign("inheritTimeServer",$this->inheritTimeServer);
262     /* Check if terminal is online */
263     if (gosaSupportDaemon::ping($this->netConfigDNS->macAddress)){
264       $smarty->assign("actions", array( "halt" => _("Switch off"), 
265                                         "reboot" => _("Reboot"),
266                                         #"memcheck" => _("Memory test"),
267                                         #"sysinfo"  => _("System analysis")
268                                         ));
269     } else {
270       $smarty->assign("actions", array("wake" => _("Wake up"),
271                                        #"memcheck" => _("Memory test"),
272                                        #"sysinfo"  => _("System analysis")
273                                         ));
274     }
276     /* Arrays */
277     $smarty->assign("modes", $this->modes);
279     $tmp2 = array(); 
280     foreach($this->config->data['SERVERS']['NFS'] as $server){
281       if($server != "default"){
282         $tmp2[$server]= $server;
283       }else{
284         if($this->member_of_ogroup){
285           $tmp2[$server]="["._("inherited")."]";
286         }
287       }
288     }
289   
290     $smarty->assign("nfsservers",     $tmp2);
291     $smarty->assign("syslogservers",  $this->gotoSyslogServers);
293     $tmp = array();
294     foreach($this->gotoNtpServers as $server){
295       if(!in_array($server,$this->gotoNtpServer)){
296         $tmp[$server] = $server;
297       }
298     }
299     
300     $smarty->assign("ntpservers",     $tmp);
301     $smarty->assign("fai_activated",$this->fai_activated);
303     /* Variables */
304     foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer","gotoSyslogServer", "gotoNtpServer") as $val){
305       $smarty->assign($val."_select", $this->$val);
306     }
308     $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
310     /* Show main page */
311     $str = $this->netConfigDNS->execute();
312     if(is_object($this->netConfigDNS->dialog)){
313       return($str);
314     }
315     $smarty->assign("netconfig", $str);
317     /* Display kerberos host key options */  
318     $smarty->assign("host_key","");
319     if(is_object($this->kerberos_key_service)){
320       $smarty->assign("host_key",$this->kerberos_key_service->execute_by_prefix("host/"));
321     }
323     return($smarty->fetch (get_template_path('terminal.tpl', TRUE, dirname(__FILE__))));
324   }
326   function remove_from_parent()
327   {
328     if($this->acl_is_removeable()){   
329       $ldap= $this->config->get_ldap_link();
330       $ldap->cd($this->dn);
331       $ldap->cat($this->dn, array('dn'));
332       if($ldap->count()){
333         $this->netConfigDNS->remove_from_parent();
334         $ldap->rmDir($this->dn);
335   
336         new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
337   
338         if (!$ldap->success()){
339           msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
340         }
342         /* Remove kerberos key dependencies too */
343         if(is_object($this->kerberos_key_service)){
344           $this->kerberos_key_service->remove_from_parent_by_prefix("host/");
345         }
347         /* Optionally execute a command after we're done */
348         $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
350         /* Delete references to object groups */
351         $ldap->cd ($this->config->current['BASE']);
352         $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
353         while ($ldap->fetch()){
354           $og= new ogroup($this->config, $ldap->getDN());
355           unset($og->member[$this->dn]);
356           $og->save ();
357         }
359         /* Remove all accessTo/trust dependencies */
360         update_accessTo($this->cn,"");
361       }
363       /* Clean queue form entries with this mac 
364        */
365       if(class_available("gosaSupportDaemon") && tests::is_mac($this->netConfigDNS->orig_macAddress)){
366         $q = new gosaSupportDaemon();
367         $q->clean_queue_from_mac($this->netConfigDNS->orig_macAddress);
368       }
369     }
370   }
373   /* Save data to object */
374   function save_object()
375   {
376     /* Create a base backup and reset the
377        base directly after calling plugin::save_object();
378        Base will be set seperatly a few lines below */
379     $base_tmp = $this->base;
380     plugin::save_object();
381     $this->base = $base_tmp;
383     /* Set new base if allowed */
384     $tmp = $this->get_allowed_bases();
385     if(isset($_POST['base'])){
386       if(isset($tmp[$_POST['base']])){
387         $this->base= $_POST['base'];
388       }
389     }
390     
391     $this->netConfigDNS->save_object();
393     /* Save terminal path to parent since it is used by termstartup, too */
394     if(isset($this->parent->by_object['termstartup'])){
395       $this->parent->by_object['termstartup']->gotoTerminalPath= $this->gotoTerminalPath;
396     }
397     
398     if(isset($_POST['termgeneric_posted'])){
399       if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
400         $this->inheritTimeServer = true;
401       }else{
402         $this->inheritTimeServer = false;
403       }
404     }  
406     if(isset($_POST["inheritAll"])){
407       $this->set_everything_to_inherited();
408     }
410     /* Hanle kerberos host key plugin */
411     if(is_object($this->kerberos_key_service)){
412       $this->kerberos_key_service->save_object_by_prefix("host/");
413     }
414   }
417   /* Check supplied data */
418   function check()
419   {
420     /* Call common method to give check the hook */
421     $message= plugin::check();
423     /* Skip IP & Mac checks if this is a template */
424     if($this->cn != "default"){
425       $message= array_merge($message, $this->netConfigDNS->check());
426     }
428     /* Permissions for that base? */
429     $this->dn= "cn=".$this->cn.",".get_ou('terminalou').$this->base;
431     if ($this->cn == ""){
432       $message[]= msgPool::required(_("Name"));
433     }
435     /* Check if given name is a valid host/dns name */
436     if(!tests::is_dns_name($this->cn) ){
437       $message[] = msgPool::invalid(_("Name"));
438     }
440     if ($this->orig_dn == 'new'){
441       $ldap= $this->config->get_ldap_link();
442       $ldap->cd ($this->base);
444       /* It is possible to have a 'default' terminal on every base */
445       if($this->cn == "default"){
446         $ldap->cat($this->dn);
447       }else{
448         $ldap->search ("(&(objectClass=gotoTerminal)(cn=".$this->cn."))", array("cn"));
449       }
450       if ($ldap->count() != 0){
451         while ($attrs= $ldap->fetch()){
452           if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".normalizePreg(get_ou('incomingou'))."/", $ldap->getDN())){
453             continue;
454           } else {
455             if ($attrs['dn'] != $this->orig_dn){
456               $message[]= msgPool::duplicated(_("Name"));
457               break;
458             }
459           }
460         }
461       }
462     }
464     /* Check for valid ntpServer selection */
465     if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
466       $message[]= msgPool::required(_("NTP server"));
467     }
469     /* Check if we are allowed to create or move this object
470      */
471     if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
472       $message[] = msgPool::permCreate();
473     }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
474       $message[] = msgPool::permMove();
475     }
477     return ($message);
478   }
481   /* Save to LDAP */
482   function save()
483   {
484     /* Detect mode changes */
485     $activate= (isset($this->saved_attributes['gotoMode']) &&
486         $this->gotoMode != $this->saved_attributes['gotoMode'] &&
487         $this->gotoMode == "enabled" &&
488         tests::is_ip($this->netConfigDNS->ipHostNumber));
490     plugin::save();
492     /* Strip out 'default' values */
493     foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
494       if(isset($this->attrs[$val])){
495         if ($this->attrs[$val] == "default"){
496           $this->attrs[$val]= array();
497         }
498       }
499     }
501     /* Add missing arrays */
502     foreach (array("ghScsiDev", "ghIdeDev", "ghNetNic") as $val){
503       if (isset ($this->$val) && count ($this->$val) != 0){
504         $this->attrs["$val"]= $this->$val;
505       }
506     }
508     /* Remove all empty values */
509     if ($this->orig_dn == 'new'){
510       $attrs= array();
511       foreach ($this->attrs as $key => $val){
512         if (is_array($val) && count($val) == 0){
513           continue;
514         }
515         $attrs[$key]= $val;
516       }
517       $this->attrs= $attrs;
518     }
520     /* Set ntpServers */
521     $this->attrs['gotoNtpServer'] = array();
522     if(!$this->inheritTimeServer){
523       foreach($this->gotoNtpServer as $server){
524         $this->attrs['gotoNtpServer'][] = $server;
525       }
526     }
528     /* cn=default and macAddress=- indicates that this is a template */
529     if($this->cn == "default"){
530       $this->netConfigDNS->macAddress = "-";
531     }
533     /* Write back to ldap */
534     $ldap= $this->config->get_ldap_link();
535     if ($this->orig_dn == 'new'){
536       $ldap->cd($this->config->current['BASE']);
537       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
538       $ldap->cd($this->dn);
539       if (!count($this->attrs['gotoNtpServer'])){
540         unset($this->attrs['gotoNtpServer']);
541       }
542       $ldap->add($this->attrs);
543       new log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
545       $this->netConfigDNS->cn = $this->cn;
546       $this->netConfigDNS->save();
548       $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
549     } else {
550       $ldap->cd($this->dn);
551       $this->cleanup();
552       $ldap->modify ($this->attrs); 
553       new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
555       $this->netConfigDNS->cn = $this->cn;
556       $this->netConfigDNS->save();
558       $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
560       /* Update all accessTo/trust dependencies */
561       if($this->orig_cn != $this->cn){
562         update_accessTo($this->orig_cn,$this->cn);
563       }
564     }
565     
566     if (!$ldap->success()){
567       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
568     }
570     /* Send installation activation
571      */
572     if ($activate && class_available("DaemonEvent")){
573       $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
574       $o_queue = new gosaSupportDaemon();
575       if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){
576         $evt = $events['TRIGGERED']['DaemonEvent_installation_activation'];
577         $tmp = new $evt['CLASS_NAME']($this->config);
578         $tmp->set_type(TRIGGERED_EVENT);
579         $tmp->add_targets(array($this->netConfigDNS->macAddress));
580         if(!$o_queue->append($tmp)){
581           msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
582         }
583       }
584     }
585   }
588   /* Display generic part for server copy & paste */
589   function getCopyDialog()
590   {
591     $vars = array("cn");
592     $smarty = get_smarty();
593     $smarty->assign("cn" ,$this->cn);
594     $smarty->assign("object","terminal");
595     $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
596     $ret = array();
597     $ret['string'] = $str;
598     $ret['status'] = "";
599     return($ret);
600   }
603   function saveCopyDialog()
604   {
605     if(isset($_POST['cn'])){
606       $this->cn = $_POST['cn'];
607     }
608   }
611   function PrepareForCopyPaste($source)
612   {
613     plugin::PrepareForCopyPaste($source);
614     if(isset($source['macAddress'][0])){
615       $this->netConfigDNS->macAddress = $source['macAddress'][0];
616     }
617     if(isset($source['ipHostNumber'][0])){
618       $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
619     }
621     /* Create used ntp server array */
622     $this->gotoNtpServer= array();
623     if(isset($source['gotoNtpServer'])){
624       $this->inheritTimeServer = false;
625       unset($source['gotoNtpServer']['count']);
626       foreach($source['gotoNtpServer'] as $server){
627         $this->gotoNtpServer[$server] = $server;
628       }
629     }
631     /* Set inherit checkbox state */
632     if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
633       $this->inheritTimeServer = true;
634       $this->gotoNtpServer=array();
635     }
636   }
639   /* Return plugin informations for acl handling */
640   static function plInfo()
641   {
642     return (array(
643           "plShortName"   => _("Terminal"),
644           "plDescription" => _("Terminal generic"),
645           "plSelfModify"  => FALSE,
646           "plDepends"     => array(),
647           "plPriority"    => 1,
648           "plSection"     => array("administration"),
649           "plCategory"    => array("terminal" => array( "description"  => _("Terminal"),
650                                                         "objectClass"  => "gotoTerminal")),
651           "plProvidedAcls"=> array(
652             "gotoMode"            => _("Mode"),
653             "gotoTerminalPath"    => _("Root server"),
654             "gotoSwapServer"      => _("Swap server"),
655             "gotoSyslogServer"    => _("Syslog server enabled"),
656             "gotoNtpServer"       => _("Ntp server settings"),
657             "base"                => _("Base"),
658             "cn"                  => _("Name"),
659             "description"         => _("Description"),
660             "gotoRootPasswd"      => _("Root password"),
661             "FAIstate"            => _("Action flag"))
662           ));
663   }
666   function set_everything_to_inherited()
667   {
668     $this->gotoTerminalPath  = "default";
669     $this->gotoSwapServer    = "default" ;
670     $this->gotoSyslogServer  = "default";
671     $this->inheritTimeServer = TRUE;
673     /* Set workstation service attributes to inherited */
674     if($this->member_of_ogroup && isset($this->parent->by_object['termservice'])){
675       foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
676             "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){
677         $this->parent->by_object['termservice']->$name = "default";
678       }
679     }
681     /* Set workstation startup attributes to inherited */
682     if($this->member_of_ogroup && isset($this->parent->by_object['termstartup'])){
683       $this->parent->by_object['termstartup']->gotoBootKernel = "default-inherited";
684       $this->parent->by_object['termstartup']->gotoLdapServer = "default-inherited";
686       $this->parent->by_object['workstartup']->gotoLdap_inherit = TRUE;
687       $this->parent->by_object['workstartup']->gotoLdapServers = array();
688     }
689   }
692 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
693 ?>