Special files in Slax modules

written by Tomas M. 6 years ago

In older Slax version (6.x) all modules could include rc script in /etc/rc.d/ which get executed even during 'activate' command. This is not the case for Slax 7, there is no such functionality so far. I'd like to make it a bit differently.

This is not implemented yet, but I'm thinking about something like this: the directory /run in each Slax module could include several special files. For example, a special file /run/activate.sh could be a script which is to be executed when the module is activated by user while running Slax. Other file could be /run/deactivate.sh, which would be executed when the module is deactivated (perhaps to properly shutdown the application and close all files so the module could be even deactivated at all). Those scripts could be also executed during system startup, so you don't need to have your own rc scripts in /etc/rc.d/ or /etc/init.d/

The main idea is that /run is overmounted by tmpfs in Slax anyway, so if the module has files in /run then those won't be visible in Slax' root filesystem at all, making them effectively hidden, only accessed through /mnt/live/memory/bundles/123-module.sb/run/* so only Slax could understand them and execute them as needed.

Tomas M.

(c) 2019, Tomas M; rss