init: Introduce switchroot command
This sets PATH, LD_LIBRARY_PATH and runs init scripts for the new root. In the future this could replace the entire set of services that should run, restarting any services for which a newer executable is available in the new root and stopping any services which don't exist in the new root. This behavior could also be useful for soft-reboots in the future to handle updates without rebooting the entire system.
This commit is contained in:
@@ -100,6 +100,7 @@ pub fn main() -> ! {
|
||||
.filter(|var| !var.starts_with(b"INITFS_"))
|
||||
.collect::<Vec<_>>()
|
||||
};
|
||||
envs.push(b"RUST_BACKTRACE=1");
|
||||
//envs.push(b"LD_DEBUG=all");
|
||||
envs.push(b"LD_LIBRARY_PATH=/scheme/initfs/lib");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user