Fix bug in shell command

This commit is contained in:
Aleksandr Didenko 2016-06-28 12:58:05 +02:00
parent 26e61fc9be
commit d7f9d4a590

View file

@ -3,7 +3,7 @@
set -e
create_network_conf() {
( echo "network:"; i=2; for ip in `cat /root/nodes `; do echo -e " node$i:\n private:\n iface: eth2\n address: $ip"; pip=`echo $ip | perl -pe "s/(\d+).(\d+).1/\${1}.\${2}.0/g"`; echo -e " public:\n iface: eth1\n address: $pip" ; i=$(( i+=1 )) ;done ) > /root/cluster-topology.yaml
( echo "network:"; i=2; for ip in `cat /root/nodes `; do echo -e " node$i:\n private:\n iface: eth2\n address: $ip"; pip=`echo $ip | perl -pe 's/(\d+).(\d+).1/\${1}.\${2}.0/g'`; echo -e " public:\n iface: eth1\n address: $pip" ; i=$(( i+=1 )) ;done ) > /root/cluster-topology.yaml
}
assign_node_roles() {