Index: sbin/init/init.c =================================================================== --- sbin/init/init.c +++ sbin/init/init.c @@ -1057,7 +1057,7 @@ run_script(const char *script) { pid_t pid, wpid; - int status; + int error, status; char *argv[4]; const char *shell; struct sigaction sa; @@ -1086,6 +1086,17 @@ #ifdef LOGIN_CAP setprocresources(RESOURCE_RC); #endif + + /* + * Try to directly execute the script first. If it + * fails, try the old method of passing the script path + * to sh(1). Don't complain if it fails because of + * the missing execute bit. + */ + error = execv(script, argv + 1); + if (error != 0 && errno != EACCES) + warning("can't exec %s: %m", script); + execv(shell, argv); stall("can't exec %s for %s: %m", shell, script); _exit(1); /* force single user mode */