mirror of https://framagit.org/kyodev/kyopages.git
maj
This commit is contained in:
parent
46e2e5f5b7
commit
1e15144739
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue