export USERNAME, USEREMAIL, FULLNAME earlier

This commit is contained in:
Jakobus Schürz 2020-07-09 21:56:55 +02:00
parent ab29cb8f92
commit 9b55204cfa

View file

@ -271,7 +271,7 @@ sshs() {
local f local f
local TMPBASHCONFIG=$(mktemp -p ${XDG_RUNTIME_DIR} -t bashrc.XXXXXXXX --suffix=.conf) local TMPBASHCONFIG=$(mktemp -p ${XDG_RUNTIME_DIR} -t bashrc.XXXXXXXX --suffix=.conf)
local FILELIST=( $(getbashrcfile) ~/.aliases "${MYSHELLCONFIG_BASE}/functions.sh" "${MYSHELLCONFIG_BASE}/aliases" "${MYSHELLCONFIG_BASE}/PS1" "${MYSHELLCONFIG_BASE}/bash_completion.d/*" "${MYSHELLCONFIG_BASE}/myshell_load_fortmpconfig" ) local FILELIST=( "${MYSHELLCONFIG_BASE}/myshell_load_fortmpconfig" $(getbashrcfile) ~/.aliases "${MYSHELLCONFIG_BASE}/functions.sh" "${MYSHELLCONFIG_BASE}/aliases" "${MYSHELLCONFIG_BASE}/PS1" "${MYSHELLCONFIG_BASE}/bash_completion.d/*" )
local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%r@%h:%p" local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%r@%h:%p"
# Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first # Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
@ -280,6 +280,10 @@ sshs() {
[ -e /etc/bash.bashrc ] && BASHRC=/etc/bash.bashrc [ -e /etc/bash.bashrc ] && BASHRC=/etc/bash.bashrc
. \$BASHRC . \$BASHRC
export USERNAME="${USERNAME}"
export FULLNAME="${FULLNAME}"
export USEREMAIL="${USEREMAIL}"
for i in /etc/profile.d/*.sh; do for i in /etc/profile.d/*.sh; do
if [ -r "$i" ];then if [ -r "$i" ];then
if [ "$PS1" ]; then if [ "$PS1" ]; then