Ticket #4605: ash-honor-env-var.patch

File ash-honor-env-var.patch, 543 bytes (added by d3m3t3r, 4 hours ago)
  • src/subshell/common.c

    diff --git a/src/subshell/common.c b/src/subshell/common.c
    index 148770dfe..4bb8b8611 100644
    a b init_subshell_child (const char *pty_name) 
    360360            init_file = g_strdup (".profile"); 
    361361        } 
    362362 
    363         /* Put init file to ENV variable used by ash */ 
    364         g_setenv ("ENV", init_file, TRUE); 
     363        /* Put init file to ENV variable used by ash but only if it 
     364           is not already set. */ 
     365        g_setenv ("ENV", init_file, FALSE); 
    365366 
    366367        break; 
    367368