mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-22 20:45:13 +00:00
FIX help was "always" showing up
Actually, showing up IFF sudo has a cached password
This commit is contained in:
parent
3d611d2fb4
commit
f8e9837dc1
2
src/tomb
2
src/tomb
@ -184,7 +184,7 @@ check_priv() {
|
|||||||
func "Using sudo for root execution of 'tomb ${(f)OLDARGS}'"
|
func "Using sudo for root execution of 'tomb ${(f)OLDARGS}'"
|
||||||
# check if sudo has a timestamp active
|
# check if sudo has a timestamp active
|
||||||
sudok=false
|
sudok=false
|
||||||
sudo -n ${TOMBEXEC} 2> /dev/null
|
sudo -n ${TOMBEXEC} &> /dev/null
|
||||||
if [ $? != 0 ]; then # if not then ask a password
|
if [ $? != 0 ]; then # if not then ask a password
|
||||||
cat <<EOF | pinentry 2>/dev/null | awk '/^D/ { print $2 }' | sudo -S -v
|
cat <<EOF | pinentry 2>/dev/null | awk '/^D/ { print $2 }' | sudo -S -v
|
||||||
OPTION ttyname=$TTY
|
OPTION ttyname=$TTY
|
||||||
|
Loading…
Reference in New Issue
Block a user