Comment 3 for bug 1316475

Revision history for this message
Robert Collins (lifeless) wrote : Re: trusty hang on first boot post deploy

the job things hang on:
description "configure network device"

emits net-device-up
emits net-device-down
emits static-network-up

start on net-device-added
stop on net-device-removed INTERFACE=$INTERFACE

instance $INTERFACE
export INTERFACE

pre-start script
    if [ "$INTERFACE" = lo ]; then
        # bring this up even if /etc/network/interfaces is broken
        ifconfig lo 127.0.0.1 up || true
        initctl emit -n net-device-up \
            IFACE=lo LOGICAL=lo ADDRFAM=inet METHOD=loopback || true
    fi
    mkdir -p /run/network
    exec ifup --allow auto $INTERFACE
end script

post-stop exec ifdown --force --allow auto $INTERFACE