File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,9 +121,6 @@ static uev_t etcw;
121121
122122static TAILQ_HEAD (, conf_change ) conf_change_list = TAILQ_HEAD_INITIALIZER (conf_change_list );
123123
124- static char * path ;
125- static char * shell ;
126-
127124static int parse_conf (char * file , int is_rcsd );
128125static void drop_changes (void );
129126
@@ -377,8 +374,6 @@ void conf_parse_cmdline(int argc, char *argv[])
377374 fstab = strdup (ptr );
378375 finit_conf = strdup (FINIT_CONF );
379376 finit_rcsd = strdup (FINIT_RCSD );
380- path = getenv ("PATH" );
381- shell = getenv ("SHELL" );
382377
383378 for (int i = 1 ; i < argc ; i ++ )
384379 parse_arg (argv [i ]);
@@ -404,13 +399,9 @@ void conf_reset_env(void)
404399 free (node );
405400 }
406401
407- if (path )
408- setenv ("PATH" , path , 1 );
409- else
402+ if (!getenv ("PATH" ))
410403 setenv ("PATH" , _PATH_STDPATH , 1 );
411- if (shell )
412- setenv ("SHELL" , shell , 1 );
413- else
404+ if (!getenv ("SHELL" ))
414405 setenv ("SHELL" , _PATH_BSHELL , 1 );
415406 setenv ("LOGNAME" , "root" , 1 );
416407 setenv ("USER" , "root" , 1 );
You can’t perform that action at this time.
0 commit comments