Uncategorized

Lunatik: Lunatik is a framework for scripting the Linux kernel with Lua

Lunatik is a framework for scripting the Linux kernel with Lua.
It’s restful by the Lua interpreter modified to poke in the kernel;
a instrument driver (written in Lua =)) and a characterize line instrument
to load and poke scripts and repute up runtime environments from the person dwelling;
a C API to load and poke scripts and repute up runtime environments from the kernel;
and Lua APIs for binding kernel products and companies to Lua scripts.

Here is an example of a persona instrument driver written in Lua the employ of Lunatik
to generate random ASCII printable characters:

instrument") local linux = require("linux") local plan nop() discontinue -- impact nothing local s = linux.stat local driver = {title = "passwd", starting up = nop, liberate = nop, mode = s.IRUGO} plan driver: be taught() -- be taught(2) callback -- generate random ASCII printable characters return string.char(linux.random(32, 126)) discontinue -- creates a brand new persona instrument instrument.new(driver)
]” dir=”auto”>

utilization: lunatik [load|unload|reload|status|list] [poke|spawn|stay<script>]
  • load: load Lunatik kernel modules
  • dump: dump Lunatik kernel modules
  • reload: reload Lunatik kernel modules
  • repute: point to which Lunatik kernel modules are at characterize loaded
  • checklist: point to which runtime environments are at characterize operating
  • poke: invent a brand new runtime ambiance to poke the script /lib/modules/lua/

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button