Code

Updated msgPools
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_workstationGeneric.inc
1 <?php
3 class workgeneric extends plugin
4 {
5   /* Generic terminal attributes */
6   var $gotoMode= "locked";
7   var $gotoSyslogServer= "";
8   var $gotoSyslogServers= array();
9   var $gotoNtpServer= array();
10   var $gotoNtpServers= array();
11   var $gotoSndModule= "";
12   var $gotoFloppyEnable= "";
13   var $gotoCdromEnable= "";
14   var $description= "";
15   var $ghCpuType= "-";
16   var $ghMemSize= "-";
17   var $ghUsbSupport= "-";
18   var $ghNetNic= array();
19   var $ghIdeDev= array();
20   var $ghScsiDev= array();
21   var $ghGfxAdapter= "-";
22   var $ghSoundAdapter= "-";
23   var $gotoLastUser= "-";
24   var $FAIscript= "";
25   var $view_logged = FALSE;
27   /* Needed values and lists */
28   var $base= "";
29   var $cn= "";
30   var $l= "";
31   var $orig_dn= "";
33   /* Plugin side filled */
34   var $modes= array();
36   var $netConfigDNS;
38   var $inheritTimeServer = true;
40   /* attribute list for save action */
41   var $ignore_account= TRUE;
42   var $attributes= array("gotoMode", "gotoSyslogServer", "gotoNtpServer",
43       "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
44       "ghCpuType", "ghMemSize", "ghUsbSupport", "description",
45       "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript");
46   var $objectclasses= array("top", "gotoWorkstation", "GOhard");
48   var $validActions   = array("reboot" => "", "localboot" => "", "halt" => "", "update" => "", "reinstall" => "",
49                             "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
50   
51   var $fai_activated = FALSE;
53   var $member_of_ogroup = FALSE;
55   var $currently_installing = FALSE;
56   var $currently_installing_warned = FALSE;
58   function workgeneric (&$config, $dn= NULL, $parent= NULL)
59   {
60     $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
61     if(!empty($tmp)){
62       $this->fai_activated = TRUE;
63     }
65     plugin::plugin ($config, $dn, $parent);
67     if(!isset($this->parent->by_object['ogroup'])){
68       $ldap = $this->config->get_ldap_link();
69       $ldap->cd ($this->config->current['BASE']);
70       $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
71       $this->member_of_ogroup = $ldap->count() >= 1;
72     }
74     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
76     /* Check if this host is currently in installation process*/
77     if(class_available("gosaSupportDaemon") && class_available("DaemonEvent")){
78       $o = new gosaSupportDaemon();
79       $e_types = DaemonEvent::get_event_types(USER_EVENT | SYSTEM_EVENT | HIDDEN_EVENT);
80       $evts = $o->get_entries_by_mac(array($this->netConfigDNS->macAddress));
81       foreach($evts as $evt){
82         if(isset($e_types['QUEUED'][$evt['HEADERTAG']]) && $evt['STATUS'] == "processing" &&
83             $e_types['QUEUED'][$evt['HEADERTAG']] == "DaemonEvent_reinstall"){
84           $this->currently_installing =TRUE;
85         }
86       }
87     }
89     /* Read arrays */
90     foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
91       if (!isset($this->attrs[$val])){
92         continue;
93       }
94       for ($i= 0; $i<$this->attrs[$val]['count']; $i++){
95         array_push($this->$val, $this->attrs[$val][$i]);
96       }
97     }
99     /* Create used ntp server array */
100     $this->gotoNtpServer= array();
101     if(isset($this->attrs['gotoNtpServer'])){
102       $this->inheritTimeServer = false;
103       unset($this->attrs['gotoNtpServer']['count']);
104       foreach($this->attrs['gotoNtpServer'] as $server){
105         $this->gotoNtpServer[$server] = $server;
106       }
107     }
109     /* Set inherit checkbox state */
110     if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer) == 0)){
111       $this->inheritTimeServer = true;
112       $this->gotoNtpServer=array();
113     }
115     /* You can't inherit the NTP service, if we are not member in an object group */
116     if(!$this->member_of_ogroup){
117       $this->inheritTimeServer = FALSE;
118     }
120     /* Create available ntp options */
121     $tmp = $this->config->data['SERVERS']['NTP'];
122     $this->gotoNtpServers = array();
123     foreach($tmp as $key => $server){
124       if($server == "default") continue;
125       $this->gotoNtpServers[$server] = $server;
126     }
128     $this->modes["active"]= _("Activated");
129     $this->modes["locked"]= _("Locked");
131     /* Set base */
132     if ($this->dn == "new"){
133       $ui= get_userinfo();
134       $this->base= dn2base($ui->dn);
135     } else {
136       $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
137     }
139     /* Create an array of all Syslog servers */
140     $tmp = $this->config->data['SERVERS']['SYSLOG'];
141     foreach($tmp as $server){
142       $visible = $server;
143       if($server == "default" && $this->member_of_ogroup) {
144         $visible = "["._("inherited")."]";
145       }
146       $this->gotoSyslogServers[$server] = $visible;
147     }
149     /* Save 'dn' for later referal */
150     $this->orig_dn= $this->dn;
151   }
154   function set_acl_base($base)
155   {
156     plugin::set_acl_base($base);
157     $this->netConfigDNS->set_acl_base($base);
158   }
160   function set_acl_category($cat)
161   {
162     plugin::set_acl_category($cat);
163     $this->netConfigDNS->set_acl_category($cat);
164   }
166   function execute()
167   {
168     /* Call parent execute */
169     plugin::execute();
171     if($this->is_account && !$this->view_logged){
172       $this->view_logged = TRUE;
173       new log("view","workstation/".get_class($this),$this->dn);
174     }
176     /* Do we need to flip is_account state? */
177     if(isset($_POST['modify_state'])){
178       if($this->is_account && $this->acl_is_removeable()){
179         $this->is_account= FALSE;
180       }elseif(!$this->is_account && $this->acl_is_createable()){
181         $this->is_account= TRUE;
182       }
183     }
185     if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->validActions[$_POST['saction']]) ){
186       $action= $_POST['saction'];
188       /* Check if we have an DaemonEvent for this action */ 
189       if(class_available("DaemonEvent")){
190         $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
191         if(isset($events['TRIGGERED']["DaemonEvent_".$action])){
192           $evt = $events['TRIGGERED']["DaemonEvent_".$action];
193           $tmp = new $evt['CLASS_NAME']($this->config);
194           $tmp->add_targets(array($this->netConfigDNS->macAddress));
195           $tmp->set_type(TRIGGERED_EVENT);
196           $o_queue = new gosaSupportDaemon();
197           if(!$o_queue->append($tmp)){
198             msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
199                   $o_queue->get_error()),ERROR_DIALOG);
200           }
201         }
202       } else {
203         msg_dialog::display(_("Event error"),
204                     sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
205       }
208     }
210     /* Do we represent a valid terminal? */
211     if (!$this->is_account && $this->parent === NULL){
212       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
213         _("This 'dn' has no workstation features.")."</b>";
214       return($display);
215     }
217     /* Base select dialog */
218     $once = true;
219     foreach($_POST as $name => $value){
220       if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_writeable("base")){
221         $once = false;
222         $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
223         $this->dialog->setCurrentBase($this->base);
224       }
225     }
227     /* Dialog handling */
228     if(is_object($this->dialog)){
229       /* Must be called before save_object */
230       $this->dialog->save_object();
232       if($this->dialog->isClosed()){
233         $this->dialog = false;
234       }elseif($this->dialog->isSelected()){
236         /* A new base was selected, check if it is a valid one */
237         $tmp = $this->get_allowed_bases();
238         if(isset($tmp[$this->dialog->isSelected()])){
239           $this->base = $this->dialog->isSelected();
240         }
242         $this->dialog= false;
243       }else{
244         return($this->dialog->execute());
245       }
246     }
248     /* Add new ntp Server to our list */ 
249     if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){
250       $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
251     }
253     /* Delete selected NtpServer for list of used servers  */
254     if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){
255       foreach($_POST['gotoNtpServerSelected'] as $name){
256         unset($this->gotoNtpServer[$name]);
257       }
258     }
260     /* Fill templating stuff */
261     $smarty= get_smarty();
263     /* Set acls */
264     $tmp = $this->plInfo();
265     foreach($tmp['plProvidedAcls'] as $name => $translation){
266       $smarty->assign($name."ACL",$this->getacl($name));
267     }
269     $smarty->assign("cn", $this->cn);
270     $smarty->assign("description", $this->description);
271     $smarty->assign("l", $this->l);
272     $smarty->assign("bases", $this->get_allowed_bases());
273     $smarty->assign("staticAddress", "");
275     $tmp = array();
276     foreach($this->gotoNtpServers as $server){
277       if(!in_array($server,$this->gotoNtpServer)){
278         $tmp[$server] = $server;
279       }
280     }
281     $smarty->assign("gotoNtpServers",$tmp);
282         
283     /* Check if workstation is online */
284     if (gosaSupportDaemon::ping($this->netConfigDNS->macAddress)){
285       $smarty->assign("actions", array("halt" => _("Switch off"), "reboot" => _("Reboot"),
286                                        "update" => _("System update"),
287                                        "reinstall" => _("Reinstall"),
288                                        "rescan" => _("Rescan hardware"),
289                                        "memcheck" => _("Memory test"),
290                                        "localboot" => _("Force localboot"),
291                                        "sysinfo"  => _("System analysis")));
292     } else {
293       $smarty->assign("actions", array("wake" => _("Wake up"),
294                                        "reinstall" => _("Reinstall"),
295                                        "update" => _("System update"),
296                                        "memcheck" => _("Memory test"),
297                                        "localboot" => _("Force localboot"),
298                                        "sysinfo"  => _("System analysis")));
299     }
300     /* Arrays */
301     $smarty->assign("modes", $this->modes);
302     $smarty->assign("nfsservers", $this->config->data['SERVERS']['NFS']);
303     $smarty->assign("syslogservers", $this->gotoSyslogServers);
304     $smarty->assign("fai_activated",$this->fai_activated);
306     $ntpser = array();
307     foreach($this->gotoNtpServers as $server){
308       if(!in_array($server,$this->gotoNtpServer)){
309         $ntpser[$server] = $server;
310       }
311     }
312     $smarty->assign("gotoNtpServers", $ntpser);
314     /* Variables */
315     foreach(array("base", "gotoMode", "gotoSyslogServer", "gotoNtpServer") as $val){
316       $smarty->assign($val."_select", $this->$val);
317     }
319     /* tell smarty the inherit checkbox state */
320     $smarty->assign("inheritTimeServer",$this->inheritTimeServer);
321     $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
323     $str = $this->netConfigDNS->execute();
324     if(is_object($this->netConfigDNS->dialog)){
325       return($str);
326     }
327     $smarty->assign("netconfig", $str);
329     /* Show main page */
330     $smarty->assign("currently_installing", $this->currently_installing);
331     return($smarty->fetch (get_template_path('workstation.tpl', TRUE, dirname(__FILE__))));
332   }
334   function remove_from_parent()
335   {
336     if($this->acl_is_removeable()){
338       $this->netConfigDNS->remove_from_parent();
339       $ldap= $this->config->get_ldap_link();
340       $ldap->rmdir($this->dn);
341       new log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
342       if (!$ldap->success()){
343         msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
344       }
346       /* Optionally execute a command after we're done */
347       $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
349       /* Delete references to object groups */
350       $ldap->cd ($this->config->current['BASE']);
351       $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
352       while ($ldap->fetch()){
353         $og= new ogroup($this->config, $ldap->getDN());
354         unset($og->member[$this->dn]);
355         $og->save ();
356       }
357     }
359     /* Clean queue form entries with this mac 
360      */
361     if(class_available("gosaSupportDaemon") && tests::is_mac($this->netConfigDNS->orig_macAddress)){
362       $q = new gosaSupportDaemon();
363       $q->clean_queue_from_mac($this->netConfigDNS->orig_macAddress);
364     }
366     if(isset($_POST["inheritAll"])){
367       $this->set_everything_to_inherited();
368     }
369   }
372   /* Save data to object */
373   function save_object()
374   {
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     /* Save base, since this is no LDAP attribute */
384     $tmp = $this->get_allowed_bases();
385     if(isset($_POST['base'])){
386       if(isset($tmp[$_POST['base']])){
387         $this->base= $_POST['base'];
388       }
389     }
391     $this->netConfigDNS->save_object();
393     /* Set inherit mode */
394     if((isset($_POST['workgeneric_posted'])) && ($this->acl_is_writeable("gotoNtpServer"))){
395       if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
396         $this->inheritTimeServer = true;
397       }else{
398         $this->inheritTimeServer = false;
399       }
400     }
401     
402     if(isset($_POST["inheritAll"])){
403       $this->set_everything_to_inherited();
404     }
405   }
408   /* Check supplied data */
409   function check()
410   {
411     /* Call common method to give check the hook */
412     $message= plugin::check();
413   
414     /* Skip IP & Mac checks if this is a template */
415     if($this->cn != "wdefault"){
416       $message= array_merge($message, $this->netConfigDNS->check());
417     }
419     $this->dn= "cn=".$this->cn.",".get_ou('workstationou').$this->base;
421     if ($this->cn == ""){
422       $message[]= _("The required field 'Workstation name' is not set.");
423     }
425     /* Check if given name is a valid host/dns name */
426     if(!tests::is_dns_name($this->cn)){
427       $message[] = _("Please specify a valid name for this object.");
428     }
430     if ($this->orig_dn != $this->dn){
431       $ldap= $this->config->get_ldap_link();
432       $ldap->cd ($this->base);
434       if($this->cn == "wdefault"){
435         $ldap->cat($this->dn);
436       }else{
437         $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn"));
438       }
439       if ($ldap->count() != 0){
440         while ($attrs= $ldap->fetch()){
441           if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".get_ou('incomingou')."/", $ldap->getDN())){
442             continue;
443           } else {
444             if ($attrs['dn'] != $this->orig_dn){
445               $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
446               break;
447             }
448           }
449         }
450       }
451     }
453     /* Check for valid ntpServer selection */
454     if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
455       $message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");
456     }
458     /* Warn the user, that this host is currently installing */
459     if($this->currently_installing && !$this->currently_installing_warned){
460       $this->currently_installing_warned = TRUE;
461       $message[] = _("This host is currently installing, if you really want to save it, save again.");
462     }
464     return ($message);
465   }
468   /* Save to LDAP */
469   function save()
470   {
471     /* Detect mode changes */
472     $activate= (isset($this->saved_attributes['gotoMode']) &&
473         $this->gotoMode != $this->saved_attributes['gotoMode'] &&
474         $this->gotoMode == "active" &&
475         tests::is_ip($this->netConfigDNS->ipHostNumber));
476     plugin::save();
478     /* Strip out 'default' values */
479     foreach (array("gotoSyslogServer") as $val){
481       if (isset($this->attrs[$val]) && $this->attrs[$val] == "default"){
482         $this->attrs[$val]= array();
483       }
484     }
486     /* Add missing arrays */
487     foreach (array("ghScsiDev", "ghIdeDev", "ghNetNic") as $val){
488       if (isset ($this->$val) && count ($this->$val) != 0){
489         $this->attrs["$val"]= $this->$val;
490       }
491     }
493     /* Remove all empty values */
494     if ($this->orig_dn == 'new'){
495       $attrs= array();
496       foreach ($this->attrs as $key => $val){
497         if (is_array($val) && count($val) == 0){
498           continue;
499         }
500         $attrs[$key]= $val;
501       }
502       $this->attrs= $attrs;
503     }
505     /* Update ntp server settings */
506     if($this->inheritTimeServer){
507       if($this->is_new){
508         if(isset($this->attrs['gotoNtpServer'])){
509           unset($this->attrs['gotoNtpServer']);
510         }
511       }else{
512         $this->attrs['gotoNtpServer'] = array();
513       }
514     }else{
515       /* Set ntpServers */
516       $this->attrs['gotoNtpServer'] = array();
517       foreach($this->gotoNtpServer as $server){
518         $this->attrs['gotoNtpServer'][] = $server;
519       }
520     }
522     /* Write back to ldap */
523     $ldap= $this->config->get_ldap_link();
524     if ($this->orig_dn == 'new'){
525       $ldap->cd($this->config->current['BASE']);
526       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
527       $ldap->cd($this->dn);
528       $ldap->add($this->attrs);
529       new log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
530       if (!$ldap->success()){
531         msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
532       }
533       $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
534     } else {
535       if ($this->orig_dn != $this->dn){
536         $this->move($this->orig_dn, $this->dn);
537       }
538       $ldap->cd($this->dn);
539       $this->cleanup();
540       $ldap->modify ($this->attrs); 
541       if (!$ldap->success()){
542         msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
543       }
544       new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
546       $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
547     }
549     /* cn=default and macAddress=- indicates that this is a template */
550     if($this->cn == "wdefault"){
551       $this->netConfigDNS->macAddress = "-";
552     }
554     $this->netConfigDNS->cn = $this->cn;
555     $this->netConfigDNS->save();
557     if ($activate && class_available("DaemonEvent")){
559       /* Send installation activation
560        */
561       $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT);
562       $o_queue = new gosaSupportDaemon();
563       if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){
564         $evt = $events['TRIGGERED']['DaemonEvent_installation_activation'];
565         $tmp = new $evt['CLASS_NAME']($this->config);
566         $tmp->set_type(TRIGGERED_EVENT);
567         $tmp->add_targets(array($this->netConfigDNS->macAddress));
568         if(!$o_queue->append($tmp)){
569           msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
570                 $o_queue->get_error()),ERROR_DIALOG);
571         }
572       }
573     }
574   }
577   /* Display generic part for server copy & paste */
578   function getCopyDialog()
579   {
580     $vars = array("cn");
581     $smarty = get_smarty();
582     $smarty->assign("cn" ,$this->cn);
583     $smarty->assign("object","workstation");
584     $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
585     $ret = array();
586     $ret['string'] = $str;
587     $ret['status'] = "";
588     return($ret);
589   }
592   function saveCopyDialog()
593   {
594     if(isset($_POST['cn'])){
595       $this->cn = $_POST['cn'];
596     }
597   }
600   function PrepareForCopyPaste($source)
601   {
602     plugin::PrepareForCopyPaste($source);
603     if(isset($source['macAddress'][0])){
604       $this->netConfigDNS->macAddress = $source['macAddress'][0];
605     }
606     if(isset($source['ipHostNumber'][0])){
607       $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
608     }
610     /* Create used ntp server array */
611     $this->gotoNtpServer= array();
612     if(isset($source['gotoNtpServer'])){
613       $this->inheritTimeServer = false;
614       unset($source['gotoNtpServer']['count']);
615       foreach($source['gotoNtpServer'] as $server){
616         $this->gotoNtpServer[$server] = $server;
617       }
618     }
620     /* Set inherit checkbox state */
621     if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer)==0)){
622       $this->inheritTimeServer = true;
623       $this->gotoNtpServer=array();
624     }
625   }
628   /* Return plugin informations for acl handling 
629       #FIXME FAIscript seams to ununsed within this class... */ 
630   static function plInfo()
631   {
632     return (array(  
633           "plShortName"   => _("Generic"),
634           "plDescription" => _("Workstation generic"),
635           "plSelfModify"  => FALSE,
636           "plDepends"     => array(),
637           "plPriority"    => 0,
638           "plSection"     => array("administration"),
639           "plCategory"    => array("workstation" => array("description"  => _("Workstation"),
640                                                           "objectClass"  => "gotoWorkstation")),
641           "plProvidedAcls"=> array(
642             "cn"                  => _("Workstation name"),
643             "description"         => _("Description") ,
644             "l"                   => _("Location") ,
645             "base"                => _("Base") ,
646             "gotoMode"            => _("Goto mode"), 
647             "gotoSyslogServer"    => _("Syslog server"), 
648             "gotoNtpServer"       => _("Ntp server"), 
649             "gotoRootPasswd"      => _("Root password"),
650             "FAIstate"            => _("Action flag"))
651           ));
652   }
654   function set_everything_to_inherited()
655   {
656     $this->gotoSyslogServer  = "default";
657     $this->inheritTimeServer = TRUE;
659     /* Set workstation service attributes to inherited */
660     if($this->member_of_ogroup && isset($this->parent->by_object['workservice'])){
661       foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
662             "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){
663         $this->parent->by_object['workservice']->$name = "default"; 
664       }
665     }
667     /* Set workstation startup attributes to inherited */
668     if($this->member_of_ogroup && isset($this->parent->by_object['workstartup'])){
669       $this->parent->by_object['workstartup']->gotoBootKernel = "default-inherited";
670       $this->parent->by_object['workstartup']->gotoLdapServer = "default-inherited";
671       $this->parent->by_object['workstartup']->FAIdebianMirror= "inherited";
672     }
673   }
675   // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
676 ?>