From 8ce4282e92455e9da19c9fc1f7d6bc313567717f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 24 Jun 2025 02:43:13 -0400 Subject: usr: Add init.rc for userspace startup flexibility Signed-off-by: Ian Moffett --- sys/kern/init_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index cd05af7..43142ec 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -46,8 +46,10 @@ #if defined(_INSTALL_MEDIA) #define _START_PATH "/usr/sbin/install" +#define _START_ARG NULL #else #define _START_PATH "/usr/bin/osh" +#define _START_ARG "/usr/rc/init.rc" #endif /* _INSTALL_MEDIA */ struct proc g_proc0; @@ -64,7 +66,7 @@ start_init(void) { struct proc *td = this_td(); struct execve_args execve_args; - char *argv[] = { _START_PATH, NULL }; + char *argv[] = { _START_PATH, _START_ARG, NULL }; char *envp[] = { NULL }; execve_args.pathname = argv[0]; -- cgit v1.2.3