1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-10-29 18:49:03 +01:00

Avoids accented name of instances in mass_deploy

This commit is contained in:
prieto 2017-03-17 13:34:38 +01:00
commit 1e7b93db52

View file

@ -46,7 +46,7 @@ then
if [ -f '/usr/share/dict/words' ]
then
echo "/usr/share/dict/words found. Using this file as source for random names"
random_name=$(sed -nE 's/^([A-Za-z0-9]+)$/\1/p' /usr/share/dict/words |shuf|head -n1)
random_name=$(sed -nE 's/^([A-Za-z0-9]+)$/\1/p' /usr/share/dict/words | iconv -f utf8 -t ascii//TRANSLIT |shuf|head -n1)
else
echo -e "\n\n\tWarning... /usr/share/dict/words not found using \$RANDOM for random names generation"
random_name=$RANDOM
@ -149,4 +149,3 @@ EOF
slim -n $iname -s --datasource_connectors mongodb --host $MONGODB_HOST --user $dbuser --password $dbpass --db_name $dbname || slim_fails "configuring the instance's datasource"
done