#!/bin/bash - 
# It's a temp workaround till compute ready

set -o nounset                              # Treat unset variables as an error

while [ ! -z "`lsof /var/log/qcloud_action.log`" ];do
    sleep 1
done

# Run from here
[ ! -z "`ip route`" ] && exit 1

echo "centos8_vpc_migrate_helper is working"

/usr/sbin/ifdown eth0
/usr/sbin/ifup eth0

echo "centos8_vpc_migrate_helper done"
exit 0
