Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 11: Line 11:     
==== DESCRIPTION ====
 
==== DESCRIPTION ====
      safe_symlink
+
===== safe_symlink =====
 
This function works like symlink(), but if the directory being linked to does not exist, it will create it.
 
This function works like symlink(), but if the directory being linked to does not exist, it will create it.
    
ie. safe_symlink("../../../functions/$function", "$cgibin/$function")
 
ie. safe_symlink("../../../functions/$function", "$cgibin/$function")
   −
      panel_link
+
===== panel_link =====
 
This function creates a link to a web panel.
 
This function creates a link to a web panel.
   Line 23: Line 23:  
  panel_link("tug", $panel);
 
  panel_link("tug", $panel);
   −
      admin_common_link
+
===== admin_common_link =====
 
This function creates a symlink from the common manager directory to a file in the functions directory.
 
This function creates a symlink from the common manager directory to a file in the functions directory.
   −
      event_link
+
===== event_link =====
 
This function creates a symlink from an action’s ordered location in an event directory to its action script.
 
This function creates a symlink from an action’s ordered location in an event directory to its action script.
   Line 36: Line 36:  
  event_link("tug-restart", $event, "40");
 
  event_link("tug-restart", $event, "40");
   −
      service_link_enhanced
+
===== service_link_enhanced =====
 
This function creates a symlink from a SysV init start or kill link in a runlevel to e-smith-service, a wrapper that is config db aware.
 
This function creates a symlink from a SysV init start or kill link in a runlevel to e-smith-service, a wrapper that is config db aware.
   Line 45: Line 45:  
  service_link_enhanced("tug", "K25", "0");
 
  service_link_enhanced("tug", "K25", "0");
   −
      safe_touch
+
===== safe_touch =====
    
This function creates an empty file, but first creates any enclosing directories.  For example:
 
This function creates an empty file, but first creates any enclosing directories.  For example:
   −
        safe_touch("a/b/c/d");
+
===== safe_touch("a/b/c/d"); =====
    
will create any of the directories "a", "a/b", "a/b/c" which don’t exist, then create an empty file "a/b/c/d".
 
will create any of the directories "a", "a/b", "a/b/c" which don’t exist, then create an empty file "a/b/c/d".
   −
      templates2events  
+
===== templates2events =====
 
This function creates a file tree (of empty files) which is used by the generic_template_expand action to determine which templates need to be expanded for a particular event. Takes one file argument and a list of event names, e.g.
 
This function creates a file tree (of empty files) which is used by the generic_template_expand action to determine which templates need to be expanded for a particular event. Takes one file argument and a list of event names, e.g.
  

Navigation menu