fix test empty variable

This commit is contained in:
Jakobus Schürz 2021-07-07 17:03:12 +02:00
parent c0b72390c1
commit 4ad1733bf9

View file

@ -834,10 +834,11 @@ utoken () {
token(){ token(){
#[ -z "${P11M+x}" ] && { P11M=/usr/lib64/p11-kit-proxy.so; export P11M; } #[ -z "${P11M+x}" ] && { P11M=/usr/lib64/p11-kit-proxy.so; export P11M; }
[ -z "${P11M+x}" ] && { P11M=$PKCS11_MODULE; export P11M; } [ -z "${P11M:+x}" ] && { P11M=$PKCS11_MODULE; export P11M; }
tmppubkey="${XDG_RUNTIME_DIR}/token.pub" tmppubkey="${XDG_RUNTIME_DIR}/token.pub"
loginfo "$(ssh-keygen -D $PKCS11_MODULE >$tmppubkey)" loginfo "$(ssh-add -L > $tmppubkey)"
# Usage: # Usage:
# token <identity> will load token in agent. does nothing, if token is already loaded # token <identity> will load token in agent. does nothing, if token is already loaded
# token -r|-f|--reload-token <identity> will remove token from agent and add it again (if plugged off and plugged in again # token -r|-f|--reload-token <identity> will remove token from agent and add it again (if plugged off and plugged in again