This commit is contained in:
kyodev 2017-09-24 08:53:39 +02:00
parent 46e2e5f5b7
commit 1e15144739
1 changed files with 2 additions and 2 deletions

View File

@ -3,11 +3,11 @@
version=24/09/2017
# $1=cmd si $2: nb de tentatives pour s'identifier, sinon 3 tentatives par défaut
f__sudo(){ # 23/09/2017
f__sudo(){ # 24/09/2017
local nb
[ "$2" ] && nb="$2" || nb="3"
for (( i=1 ; i<="$nb" ; i++ )); do
su -lc "$1"
su -c "$1"
[ "$?" == 0 ] && break
[ "$i" == "$nb" ] && echo " $nb échec d'authentification, recommencer"
done