User Tools

Site Tools


esmith:build:createlinks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
esmith:build:createlinks [2015/05/22 06:03]
stephdl created
esmith:build:createlinks [2015/05/22 07:12]
stephdl [AUTHOR]
Line 1: Line 1:
 +====== esmith::Build::CreateLinks ======
 esmith::Build::CreateLUser(Contributed Perl Documesmith::Build::CreateLinks(3) esmith::Build::CreateLUser(Contributed Perl Documesmith::Build::CreateLinks(3)
  
-NAME+for the latest version, do  
 +  yum install nethserver-devtools 
 +  perldoc esmith::Build::CreateLinks 
 +==== NAME ==== 
        esmith::Build::CreateLinks - A library for creating symlinks during rpm construction.        esmith::Build::CreateLinks - A library for creating symlinks during rpm construction.
  
-SYNOPSIS+==== SYNOPSIS ==== 
            use esmith::Build::CreateLinks qw(:all);            use esmith::Build::CreateLinks qw(:all);
  
            safe_symlink("../../../functions/$function", "$cgibin/$function")            safe_symlink("../../../functions/$function", "$cgibin/$function")
  
-DESCRIPTION +==== DESCRIPTION ==== 
-   safe_symlink + 
-       This function works like symlink(), but if the directory being linked to does not exist, it will create it.+===    safe_symlink === 
 + 
 +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.
  
           ie.           ie.
Line 22: Line 31:
            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.+
  
-   event_link +This function creates a symlink from the common manager directory to a file in the functions directory. 
-       This function creates a symlink from an action’s ordered location in an event directory to its action script.+ 
 +===    event_link === 
 + 
 +This function creates a symlink from an action’s ordered location in an event directory to its action script.
  
           ie.           ie.
Line 35: Line 46:
            event_link("tug-restart", $event, "40");            event_link("tug-restart", $event, "40");
  
-   validator_link +===    validator_link === 
-       This function creates a symlink from an action’s ordered location in a validator directory to its action script.+ 
 +This function creates a symlink from an action’s ordered location in a validator directory to its action script.
  
           ie.           ie.
Line 43: Line 55:
            validator_link("max-users", $validator, "20");            validator_link("max-users", $validator, "20");
  
-   validator_actions($validatorName, @action_specs) +===    validator_actions($validatorName, @action_specs) === 
-       Create links to actions for the given validator. @actions_specs is a list of pairs Action => Priority. E.g+ 
 +Create links to actions for the given validator. @actions_specs is a list of pairs Action => Priority. E.g
  
          validator_actions('validator-name', 'act1' => '10', 'act2' => '20', ..);          validator_actions('validator-name', 'act1' => '10', 'act2' => '20', ..);
  
-       See also validator_link(). +See also validator_link(). 
-   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.
  
           ie.           ie.
Line 58: Line 72:
            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 
-       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.
-       argument and a list of event names, e.g.+
  
         templates2events("/etc/some/file", "event1", "event2", ...);         templates2events("/etc/some/file", "event1", "event2", ...);
  
-   event_templates($event, @paths) +===    event_templates($event, @paths) === 
-       This function is similar to templates2events(): determines the list of templates to be expanded for the given an event name. E.g.+ 
 +This function is similar to templates2events(): determines the list of templates to be expanded for the given an event name. E.g.
  
         event_templates("event1", "/etc/some/file1", "/etc/some/file2, ...);         event_templates("event1", "/etc/some/file1", "/etc/some/file2, ...);
  
-   event_actions($event, @action_specs) +===    event_actions($event, @action_specs) === 
-       Create links to actions for the given event. @actions_specs is a list of pairs Action => Priority. E.g+ 
 +Create links to actions for the given event. @actions_specs is a list of pairs Action => Priority. E.g
  
          event_actions('myevent', 'act1' => '10', 'act2' => '20', ..);          event_actions('myevent', 'act1' => '10', 'act2' => '20', ..);
  
-       See also event_link().+See also event_link().
  
-   event_services($event, @service_specs) +===    event_services($event, @service_specs) === 
-       Create links for the given $event in services2adjust/ subdirectory. @service_specs is a list of pairs Service => LinkDestination+ 
 +Create links for the given $event in services2adjust/ subdirectory. @service_specs is a list of pairs Service => LinkDestination
  
          event_services('myevent', 'sshd' => 'restart', 'samba' => 'reload')          event_services('myevent', 'sshd' => 'restart', 'samba' => 'reload')
  
-       See also safe_symlink().+See also safe_symlink().
  
-AUTHOR +==== AUTHOR ==== 
-       - SME Server Developers <bugs@e-smith.com> + 
-       - Nethesis srl www.nethesis.it <bugs@nethesis.it>+  SME Server Developers <bugs@e-smith.com> 
 +  Nethesis srl www.nethesis.it <bugs@nethesis.it>
  
 perl v5.10.1                      2015-05-19     esmith::Build::CreateLinks(3) perl v5.10.1                      2015-05-19     esmith::Build::CreateLinks(3)
  
 +
 +{{tag> neth-development}}
esmith/build/createlinks.txt · Last modified: 2019/06/05 19:48 (external edit)