In article <004e8170-e842-4e8b-9623-db3ea236d...@outlook.com>, Carlos Lopez <clo...@outlook.com> wrote: > Hi all, > > > With SystemD, how can I make certain service dependent on certain network > interfaces being up? > > For example, I have an 802.1ad bond interface I need to wait on for being up > (this interface has no ip address assigned, > it is used to capture networks packets with a tcpdumpâs script). Every time > this service fails because bond interface > is not up. > > > > I have configured the service as: > > > > [Unit] > > Description=tcpdump capture script > > After=network.target > > Wants=network-online.target > > > > But it doesnât work â¦. Any tip or trick?
Just add a line to the tcpdump script to wait for the interface. Something like this: until ifconfig -s | grep -q '^bond0' ; do sleep 1 ; done Cheers Tony -- Tony Mountifield Work: t...@softins.co.uk - http://www.softins.co.uk Play: t...@mountifield.org - http://tony.mountifield.org
_______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos