diff --git a/apps/preinit.cpp b/apps/preinit.cpp index 8d1a4652..e9d99160 100644 --- a/apps/preinit.cpp +++ b/apps/preinit.cpp @@ -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");