Add in kent robotti's updated dos2unix.c
[oweals/busybox.git] / init.c
diff --git a/init.c b/init.c
index 4c05c38e3cfa67f5c3cdcb78eba16e94e032fc7d..4284600c415b9c08c555f73a5eedcdda16494130 100644 (file)
--- a/init.c
+++ b/init.c
@@ -93,9 +93,8 @@ static const int RB_AUTOBOOT = 0x01234567;
 #endif
 #endif
 
-#ifndef _PATH_STDPATH
+#undef _PATH_STDPATH
 #define _PATH_STDPATH  "/usr/bin:/bin:/usr/sbin:/sbin"
-#endif
 
 
 #if defined BB_FEATURE_INIT_COREDUMPS
@@ -420,9 +419,6 @@ static pid_t run(char *command, char *terminal, int get_enter)
        while ((environ[j]) && (i < MAXENV)) {
                if (strncmp(environ[j], "TERM=", 5))
                        environment[i++] = environ[j];
-               else {
-                       snprintf(termType, sizeof(termType) - 1, environ[j]);
-               }
                j++;
        }
 
@@ -462,9 +458,8 @@ static pid_t run(char *command, char *terminal, int get_enter)
                         * specifies.
                         */
 #ifdef DEBUG_INIT
-                       pid_t shell_pgid = getpid();
                        message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\r\n",
-                                       command, shell_pgid, terminal);
+                                       command, getpid(), terminal);
 #endif
                        write(fileno(stdout), press_enter, sizeof(press_enter) - 1);
                        getc(stdin);
@@ -473,7 +468,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
 #ifdef DEBUG_INIT
                /* Log the process name and args */
                message(LOG, "Starting pid %d, console %s: '%s'\r\n",
-                               shell_pgid, terminal, command);
+                               getpid(), terminal, command);
 #endif
 
                /* See if any special /bin/sh requiring characters are present */