Your message dated Sun, 22 Dec 2019 16:12:34 +0100
with message-id <[email protected]>
and subject line Re: Bug#947158: systemd: After=network.target is ineffective
has caused the Debian Bug report #947158,
regarding systemd: After=network.target is ineffective
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
947158: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947158
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 241-7~deb10u2
Severity: normal
Tags: patch

Lately (since buster?) I observe that "After=network.target" is ineffective,
maybe because dhcpcd runs asynchronously. I seem to get good results by
creating a file

  /etc/network/if-up.d/00waitup

with contents as below.


Cheers, Paul
-- 
Paul Szabo   [email protected]   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia


Contents of /etc/network/if-up.d/00waitup :

#!/bin/bash -

#V0.1  22 Dec 19  wait for (ensure) interface is up
# Paul Szabo   [email protected]

# Ensure network interface is "up".
# DHCP may take long... and at buster it seems to be done asynchronously,
# so systemd "After=network.target" is ineffective.

# Though neither we, nor any commands we run, should ever fail or
# show anything on STDERR: ensure we do not, otherwise ifup may think
# we failed, and fail the interface. 
exec 2>&1

case "$IFACE" in
  eth* ) echo -E "00waitup: Waiting for $IFACE to be up ...";;
  * ) echo -E "00waitup: No waiting for $IFACE"; exit;;
esac

n=0
while :; do
  LINE="$(ip -o address show $IFACE)"
  if [ -n "$LINE" ] ; then
    echo -E "00waitup: $IFACE is up, 'ip -o address show $IFACE' shows '$LINE'"
    exit
  fi
  (( n = $n+1 ))
  if [ $n -gt 60 ]; then
    echo -E "00waitup: 'ip -o address show $IFACE' failed, seems down, giving 
up"
    exit
  fi
  echo -n -E "00waitup: Waiting for $IFACE to come up at "; date
  sleep 1
done

--- End Message ---
--- Begin Message ---
Am 22.12.19 um 07:51 schrieb Paul Szabo:
> Package: systemd
> Version: 241-7~deb10u2
> Severity: normal
> Tags: patch
> 
> Lately (since buster?) I observe that "After=network.target" is ineffective,
> maybe because dhcpcd runs asynchronously. I seem to get good results by
> creating a file
> 

network.target does not ensure that network is up during boot up, it's
mostly relevant for shutdown.

See https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to