Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions scripts/init-premount/tailscale
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,21 @@ run_tailscale()
# or the boot process continues toward finish.
while true; do
# "." builtin (in dash) exits on error. Run configure_networking
# in a subshell and wait for it.
# in a subshell and wait for it. Poll PIDFILE while waiting so we
# can exit promptly if init-bottom signals boot is continuing.
configure_networking &
wait $!
if ! [ -e "$PIDFILE" ]; then
break
fi
net_pid=$!
while kill -0 $net_pid 2>/dev/null; do
if ! [ -e "$PIDFILE" ]; then
kill $net_pid 2>/dev/null
wait $net_pid 2>/dev/null
log_end_msg
exit 0
fi
sleep 1
done
wait $net_pid

if network_up; then
create_resolv_conf
break
Expand Down