diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-29 20:49:14 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-29 20:50:41 -0400 |
commit | 1551310aa5484a483cad4e6ae4a358cb509cbef8 (patch) | |
tree | 3b765845a7fb7e2d9bcaab2ecfa56af9dec49f68 /sys | |
parent | 5920cf33f368b8de20919c44fa574fd6c69f69e8 (diff) |
usr.sbin: init: Allow start path to be overridden
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/init_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 797319f..dfb058a 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -44,10 +44,11 @@ #include <vm/vm.h> #include <string.h> +#define _START_PATH "/usr/sbin/init" #if defined(_INSTALL_MEDIA) -#define _START_PATH "/usr/sbin/install" +#define _START_ARG "/usr/sbin/install" #else -#define _START_PATH "/usr/sbin/init" +#define _START_ARG NULL #endif /* _INSTALL_MEDIA */ struct proc g_proc0; @@ -64,7 +65,7 @@ start_init(void) { struct proc *td = this_td(); struct execve_args execve_args; - char *argv[] = { _START_PATH, NULL, NULL }; + char *argv[] = { _START_PATH, _START_ARG, NULL }; char *envp[] = { NULL }; kprintf("starting init...\n"); |