Commit bf21282f authored by nanahira's avatar nanahira

fix check interface up

parent 6101e2e2
...@@ -49,7 +49,7 @@ _wait_for_interface_online() { ...@@ -49,7 +49,7 @@ _wait_for_interface_online() {
echo "Waiting for interface $INTERFACE." echo "Waiting for interface $INTERFACE."
CURRENT_STATUS=1 CURRENT_STATUS=1
while [[ "$CURRENT_STATUS" != 0 ]]; do while [[ "$CURRENT_STATUS" != 0 ]]; do
ifconfig "$INTERFACE" | grep 'RUNNING' ifconfig "$INTERFACE" | grep -P 'RUNNING|inet6'
CURRENT_STATUS=$? CURRENT_STATUS=$?
if [[ "$CURRENT_STATUS" != 0 ]]; then if [[ "$CURRENT_STATUS" != 0 ]]; then
echo "Interface $INTERFACE is bad. Will try again after 3s." echo "Interface $INTERFACE is bad. Will try again after 3s."
......
...@@ -139,6 +139,11 @@ ...@@ -139,6 +139,11 @@
{% endfor %} {% endfor %}
dest: /etc/dhcp/dhclient.conf dest: /etc/dhcp/dhclient.conf
- name: dhclient hook directory
become: true
file:
path: /etc/dhcp/dhclient-enter-hooks.d
state: directory
- name: remove dhclient resolved hook - name: remove dhclient resolved hook
become: true become: true
file: file:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment