summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Pravec <David.Pravec@danix.org>2010-12-24 01:51:33 +0000
committerTarmac <>2010-12-24 01:51:33 +0000
commit956f842c587bf1610f55ca3893f3b9eef924293c (patch)
tree7d5a89e6e5bb8492dcf6a2b17d20b471a77d0bbe /tools
parent75e2cbec9eb5132a49446f1b6d563d5f43d007de (diff)
parent24eada1bf54f973d5bd423ba51d505352321324c (diff)
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/clean-vlans2
-rwxr-xr-xtools/setup_iptables.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/clean-vlans b/tools/clean-vlans
index f5b0295ad..820a9dbe5 100755
--- a/tools/clean-vlans
+++ b/tools/clean-vlans
@@ -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
diff --git a/tools/setup_iptables.sh b/tools/setup_iptables.sh
index 673353eb4..8be8cd812 100755
--- a/tools/setup_iptables.sh
+++ b/tools/setup_iptables.sh
@@ -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