preinit: Search for init in several directories
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-07-30 13:08:53 +02:00
parent 43fa128e29
commit 6e269c6bc4
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -72,13 +72,10 @@ int main()
// Now, mount the /dev file system on the new root.
mount_devfs();
/*setenv("PATH", "/bin:/usr/bin", 1);
setenv("PATH", "/sbin:/usr/bin", 1);
char* argv[] = { "init", nullptr };
char* envp[] = { nullptr };
execvpe(argv[0], argv, envp);*/
char* argv[] = { "/usr/bin/init", nullptr };
execv(argv[0], argv);
execvpe(argv[0], argv, envp);
fail_errno("Failed to execute init");