set PKCS11_MODULE in tmux only if itselt is defined

This commit is contained in:
Jakobus Schürz 2023-03-01 13:37:05 +01:00
parent 0d52aeba3b
commit 4969c361b8

View file

@ -76,7 +76,7 @@ function _pkcs11module_hook() {
loginfo "PKCS11_MODULE: $PKCS11_MODULE" loginfo "PKCS11_MODULE: $PKCS11_MODULE"
if [ -n "${TMUX}" ]; then if [ -n "${TMUX}" -a -n "${PKCS11_MODULE}" ]; then
logdebug "set PKCS11_MODULE also in tmux environment" logdebug "set PKCS11_MODULE also in tmux environment"
tmux set-environment PKCS11_MODULE ${PKCS11_MODULE} tmux set-environment PKCS11_MODULE ${PKCS11_MODULE}
tmux set-environment -g PKCS11_MODULE ${PKCS11_MODULE} tmux set-environment -g PKCS11_MODULE ${PKCS11_MODULE}