|
|
@ -304,6 +304,12 @@ func (st *initState) handleRunShell(rs *RunShellMsg, msg *ipc.Message) error {
|
|
|
|
if rs.Term != "" {
|
|
|
|
if rs.Term != "" {
|
|
|
|
cmd.Env = append(cmd.Env, "TERM="+rs.Term)
|
|
|
|
cmd.Env = append(cmd.Env, "TERM="+rs.Term)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if msg.Ucred.Uid != 0 && msg.Ucred.Gid != 0 {
|
|
|
|
|
|
|
|
if homedir, _ := st.fs.GetHomeDir(); homedir != "" {
|
|
|
|
|
|
|
|
cmd.Dir = homedir
|
|
|
|
|
|
|
|
cmd.Env = append(cmd.Env, "HOME="+homedir)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
cmd.Env = append(cmd.Env, "PATH=/usr/bin:/bin")
|
|
|
|
cmd.Env = append(cmd.Env, "PATH=/usr/bin:/bin")
|
|
|
|
cmd.Env = append(cmd.Env, fmt.Sprintf("PS1=[%s] $ ", st.profile.Name))
|
|
|
|
cmd.Env = append(cmd.Env, fmt.Sprintf("PS1=[%s] $ ", st.profile.Name))
|
|
|
|
st.log.Info("Executing shell...")
|
|
|
|
st.log.Info("Executing shell...")
|
|
|
|