From e3d36451311815f202ddd84885315aa7e4fd2f04 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 11 Oct 2013 00:54:42 +0300 Subject: [PATCH] improved verifcation for aws workaround --- bin/v-update-sys-ip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip index 181b05ef0..c8dea4efd 100755 --- a/bin/v-update-sys-ip +++ b/bin/v-update-sys-ip @@ -42,8 +42,8 @@ ip_num=$(echo "$ip_list" | wc -l) vst_ip_list=$(ls $VESTA/data/ips/) vst_ip_num=$(echo "$vst_ip_list" | wc -l) -if [ "$ip_num" -eq '1' ] && [ "$vst_ip_num" -eq '1' ]; then - if [ "$ip_list" != "$vst_ip_list" ]; then +if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then + if [ $ip_num -eq 1 ] && [ "$ip_list" != "$vst_ip_list" ]; then new=$ip_list old=$vst_ip_list mv $VESTA/data/ips/$old $VESTA/data/ips/$new