muvm-guest: Support root and user init scripts#87
Closed
hoshinolina wants to merge 1 commit intoAsahiLinux:mainfrom
Closed
muvm-guest: Support root and user init scripts#87hoshinolina wants to merge 1 commit intoAsahiLinux:mainfrom
hoshinolina wants to merge 1 commit intoAsahiLinux:mainfrom
Conversation
Introduce two scripts that can be placed in ~/.local/share/muvm - init.sh: Executed as root, before dropping privileges - user.sh: Executed as the user, after dropping privileges If the files are also present in lower-priority XDG dirs (systemwide), those are executed first. This makes it possible to add custom VM configuration and setup or debugging scripts without having to hack on the muvm code. Signed-off-by: Asahi Lina <lina@asahilina.net>
eed5710 to
475d018
Compare
| // See https://doc.rust-lang.org/std/env/fn.set_var.html#safety | ||
| env::set_var("HOME", user.dir); | ||
| let xdg_dirs = xdg::BaseDirectories::with_prefix("muvm")?; | ||
| // SAFETY: Safe if and only if `muvm-guest` program is not multithreaded. |
Member
Collaborator
|
I think I understand the motivation, but I'm afraid this may open the floods to users implementing all shorts of hacks behind Beyond developing purposes, I think the configuration to the VM should be applied by |
Contributor
Author
|
Closing in favor of #89 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce two scripts that can be placed in ~/.local/share/muvm
If the files are also present in lower-priority XDG dirs (systemwide), those are executed first.
This makes it possible to add custom VM configuration and setup or debugging scripts without having to hack on the muvm code.