Skip to content

Commit e3d3645

Browse files
committed
improved verifcation for aws workaround
1 parent c485608 commit e3d3645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v-update-sys-ip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ ip_num=$(echo "$ip_list" | wc -l)
4242
vst_ip_list=$(ls $VESTA/data/ips/)
4343
vst_ip_num=$(echo "$vst_ip_list" | wc -l)
4444

45-
if [ "$ip_num" -eq '1' ] && [ "$vst_ip_num" -eq '1' ]; then
46-
if [ "$ip_list" != "$vst_ip_list" ]; then
45+
if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
46+
if [ $ip_num -eq 1 ] && [ "$ip_list" != "$vst_ip_list" ]; then
4747
new=$ip_list
4848
old=$vst_ip_list
4949
mv $VESTA/data/ips/$old $VESTA/data/ips/$new

0 commit comments

Comments
 (0)