Skip to content
Snippets Groups Projects
Verified Commit c4fecab7 authored by David Beniamine's avatar David Beniamine
Browse files

Make script reentrant

parent 751a1772
Branches
No related tags found
No related merge requests found
......@@ -33,8 +33,15 @@ fi
while read first last level gender categorie
do
echo "Creating user for $first $last"
uid=`ldapsearch -x cn="$first $last" | grep "^uid:" | cut -d ' ' -f 2`
if [ -z "$uid" ]
then
$scriptbinpath/userAdd.pl $first $last "xxx" "" $gender $categorie
else
echo "Not recreating user $uid"
fi
uid=`ldapsearch -x cn="$first $last" | grep "^uid:" | cut -d ' ' -f 2`
echo "found uid '$uid'"
if [ -z "$uid" ]
then
KO="$KO $uid"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment