Make nova work even when user has LANG or LC_ALL configured

Some commands are having different results when used in another language environment.
  For example ifconfig output parsing fails in my language.
  Also unittest using cat failed, as it didnt expect czech language in the error message.
  
  This small patch makes it work.
  Also adding myself to 'Authors' file.
This commit is contained in:
David Pravec
2010-12-16 12:35:46 +01:00
parent a90ac5ad52
commit e09a2049b3
2 changed files with 3 additions and 1 deletions

View File

@@ -17,6 +17,8 @@
# License for the specific language governing permissions and limitations
# under the License.
export LC_ALL=C
sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down
sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo brctl delbr foo
sudo ifconfig -a | grep vlan | grep -v vlan124 | grep -v vlan5 | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down

View File

@@ -36,7 +36,7 @@ else
# NOTE(vish): This will just get the first ip in the list, so if you
# have more than one eth device set up, this will fail, and
# you should explicitly pass in the ip of the instance
IP=`ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
IP=`LC_ALL=C ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
fi
if [ -n "$3" ]; then