Browse Source

Avoids accented name of instances in mass_deploy

prieto 7 years ago
parent
commit
1e7b93db52
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      progs/mass_deploy.sh

+ 1
- 2
progs/mass_deploy.sh View File

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

Loading…
Cancel
Save