We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c485608 commit e3d3645Copy full SHA for e3d3645
1 file changed
bin/v-update-sys-ip
@@ -42,8 +42,8 @@ ip_num=$(echo "$ip_list" | wc -l)
42
vst_ip_list=$(ls $VESTA/data/ips/)
43
vst_ip_num=$(echo "$vst_ip_list" | wc -l)
44
45
-if [ "$ip_num" -eq '1' ] && [ "$vst_ip_num" -eq '1' ]; then
46
- 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
47
new=$ip_list
48
old=$vst_ip_list
49
mv $VESTA/data/ips/$old $VESTA/data/ips/$new
0 commit comments