Added SHELL and TERM to environment whitelist and start $SHELL if set
Currently the shell provided via the 'shell' command is always '/bin/sh' and does not have a TERM variable set. This is a rather spartan shell experience. With this patch we add the TERM variable to the whitelist, so that pagers work better and made the shell binary dependent from the SHELL environment variable. If no such variable is set, we fall back to using '/bin/sh'. Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
		
				
					committed by
					
						
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							bb2e98344a
						
					
				
				
					commit
					81a30bc600
				
			@@ -170,7 +170,8 @@ def get_oe_environ(config, build_dir):
 | 
				
			|||||||
        ew = env['BB_ENV_EXTRAWHITE'] + ' '.join(vars)
 | 
					        ew = env['BB_ENV_EXTRAWHITE'] + ' '.join(vars)
 | 
				
			||||||
        env.update({'BB_ENV_EXTRAWHITE': ew})
 | 
					        env.update({'BB_ENV_EXTRAWHITE': ew})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vars.extend(['SSH_AGENT_PID', 'SSH_AUTH_SOCK'])
 | 
					    vars.extend(['SSH_AGENT_PID', 'SSH_AUTH_SOCK',
 | 
				
			||||||
 | 
					                 'SHELL', 'TERM'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for v in vars:
 | 
					    for v in vars:
 | 
				
			||||||
        if v in os.environ:
 | 
					        if v in os.environ:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -73,7 +73,7 @@ class ShellCommand(Command):
 | 
				
			|||||||
        return 'shell'
 | 
					        return 'shell'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def execute(self, config):
 | 
					    def execute(self, config):
 | 
				
			||||||
        cmd = ['/bin/sh']
 | 
					        cmd = [config.environ.get('SHELL', '/bin/sh')]
 | 
				
			||||||
        if self.cmd:
 | 
					        if self.cmd:
 | 
				
			||||||
            cmd.append('-c')
 | 
					            cmd.append('-c')
 | 
				
			||||||
            cmd.append(self.cmd)
 | 
					            cmd.append(self.cmd)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user