.lua_wrapper

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 08 April 2025
Index Return to Main Contents

 

NAME

lua_wrapper - wrap Lua scripts to ensure lua startup

 

SYNOPSIS

edrc/bin/luaprogram -> .lua_wrapper

edrc/lib/luaprogram -> .lua_wrapper

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

Wrap Lua scripts/programs to avoid using #!/usr/bin/lua or similar path names in the magic key. This enhances the portability of WA2L/edrc commands written in Lua to systems where lua is not installed in the default install locations or to use lua distributed with WA2L/edrc.

lua has to be installed in edrc/bin/, /usr/bin/, /bin/, /sbin/, /usr/local/bin/ or /usr/contrib/bin/.

Further lua locations can be configured in the optional config file lua_wrapper.cfg.

The Lua packages/modules bundled with WA2L/edrc that are installed in lib/lua/lum/<OSID>/<major>.<minor>/ are included in the Lua path (LUA_PATH, LUA_CPATH).

To start a new command thru the .lua_wrapper, follow the following steps:

1.)
create a symlink to the new command in the edrc/bin/ or edrc/lib/ directory depending on your needs:

[ /opt/edrc/bin ]
[ root@acme001 ][*edrc*/bash]: ln -s .lua_wrapper new_cmd 

2.)
install the Lua script/program in the edrc/lib/lua/ directory:

[ /opt/edrc/lib/lua ]
[ root@acme001 ][*edrc*/bash]: vi new_cmd

[ /opt/edrc/lib/lua ]
[ root@acme001 ][*edrc*/bash]: chmod 644 new_cmd

 

OPTIONS

-

 

ENVIRONMENT

-

 

EXIT STATUS

101
shell (lua) not found. If lua is installed on the system and you get this error, add the lua location in the configuration file lua_wrapper.cfg.

102
the Lua script to be started that should be located in lib/lua/ does not exist.

103
user calling the command has no permission to access/execute the called luaprogram.

107
the .lua_wrapper was called directly.

 

FILES

For a detailed description of the FILES, see: luaenv(3).

etc/lua_wrapper.cfg
configuration file for the .lua_wrapper command.

lib/lua/
location of the wrapped Lua scripts/programs. This files should have the file permissions 644 to show, that those scripts should not be started directly.

lib/lua/lum/<OSID>/<major>.<minor>/
location of the Lua packages/modules bundled with WA2L/edrc.

 

EXAMPLES

-

 

SEE ALSO

edrcintro(1), binprobe(1m), cmdlist(1m), daemon_wrapper(1), java_wrapper(1), ksh_wrapper(1), ld(1), ln(1), lua(1), luac(1), luaenv(3), luaversion(3), lua_wrapper.cfg(4), osid(3), os_wrapper(1), python_wrapper(1), perl_wrapper(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

lua_wrapper was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2025 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 09:57:56 GMT, April 11, 2025