Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for dynamic multiplexing of services #753

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

navi-desu
Copy link
Member

generate a new directory on the service dir, "multiplexed", which will
hold all the symlinks we generate at runtime, and a new librc function,
"rc_service_multiplex", which takes a basename or service path, and a
variant name, then generated a symlink to the base service from the
multiplex dir.

this allows multiplexing services at runtime, possibly using data
acquired at runtime, such as the name of an user or interface.

this is the second of three patchsets for user services support

as an initial barebones implementation, it's useful only for generating
services without dynamically multiplexed dependencies, as this is what's
needed for bootstrapping the openrc user script in a new session.

a future patch may improve on it, possibly integrating it in dependency
resolution and on the rc-service tool.

Use the realpath of the target to locate which system directory it's
in, using it as a base to load the config file. the service path is then
normalized from the symlink without dereferencing it.

Introduce a new variable for openrc-run, $RC_SYSCONFDIR, which points to
the respective system directory of the base service.

Signed-off-by: Anna (navi) Figueiredo Gomes <[email protected]>
Generate a new directory on the service dir, "multiplexed", which will
hold all the symlinks we generate at runtime, and a new librc function,
"rc_service_multiplex", which takes a basename or service path, and a
variant name, then generated a symlink to the base service from the
multiplex dir.

This allows multiplexing services at runtime, possibly using data
acquired at runtime, such as the name of an user or interface.
@navi-desu
Copy link
Member Author

currently working on how to make sure multiplexed services get added to the deptree properly

probably gonna split the deptree generating function so we can also call it per-service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant