Differences

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

Link to this comparison view

Both sides previous revision Previous revision
api:rc [2018/09/08 09:13]
payonel
api:rc [2023/02/20 10:51] (current)
bioscreeper [Minimal Setup]
Line 26: Line 26:
 The astute reader will have noticed that our `start` function in the minimal example is lacking a `local` scope designation. This was intentional. RC scripts are loaded in a sandboxed environment and these global functions act as an interface between the source and the rc controller. Every method you want the rc controller to have access to needs to be a globally defined method in your rc script file. The astute reader will have noticed that our `start` function in the minimal example is lacking a `local` scope designation. This was intentional. RC scripts are loaded in a sandboxed environment and these global functions act as an interface between the source and the rc controller. Every method you want the rc controller to have access to needs to be a globally defined method in your rc script file.
  
-OpenOS ships is an example rc script. Review `/​etc/​rc.d/​example.lua`+OpenOS ships with an example rc script. Review `/​etc/​rc.d/​example.lua`
  
 ==== RC Script Methods ==== ==== RC Script Methods ====