metricspi/package/dhcpcd/online.hook.sh

17 lines
579 B
Bash

#!/bin/sh
# If the `/run/dhcpcd/wait-online` named pipe is present, it means
# the *dhcpcd-wait-online.service* systemd unit is active. This unit
# helps order the activation of other units, especially during bootup.
# Once the interface is configured and active, we write a message to
# the pipe to indicate that the boot process can continue and services
# that require the network to be online can be started.
if $if_configured; then
if $if_up; then
if [ -p /run/dhcpcd/wait-online ]; then
echo online > /run/dhcpcd/wait-online
fi
fi
fi