Am 24.01.2018 um 09:59 schrieb Yubin Ruan:
On Wed, Jan 24, 2018 at 08:57:18AM +0100, Reindl Harald wrote:
Am 24.01.2018 um 08:13 schrieb Yubin Ruan:
On Tue, Jan 23, 2018 at 04:10:10PM +0100, Lennart Poettering wrote:
On Di, 23.01.18 09:09, Reindl Harald ([email protected]) wrote:
depeding on how your network is configured use "network.service" or
"networkmanager.service" (or however the networkmanager service is called in
detail, i don#t use it)
Nope. Use "network-online.target" if you are looking for a generic
unit to order after that is reached only after the network has been
"configured" for the first time, for some vague definition of
"configured", that is up to the networking implementation to fill with
sense...
Now I have these in the configuration file
[Unit]
Description=Sync mail
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=oneshot
ExecStart=/path/to/the/script
TimeoutStartSec=1min30s
[Install]
WantedBy=default.target
However the script is still broken at system startup. Hmm...I am using a
Ubuntu 16.04LTS. I will post if there are any news
AGAIN: how is your network started
Lennart is *not* correct - at least on Fedora all the wait-online stuff
don't work while "After=network.service" does when you still ue the cliassic
network.service for a lot of obvious reasons
well, then try "After=networking.service network-manager.service"
despite what others saying about targets - iam dong the same with
"After=network.service" on Fedora for some years on 30 production
servers and it works just fine
in fact we have "After=network.service systemd-networkd.service
network-online.target" on any service which needs networking on Fedora
and RHEL7
Below are /etc/init.d/networking and /etc/init.d/network-manager respectively.
It seems that it is /etc/init.d/networking that is responsible for bringing up
the network.
######################################
# /etc/init.d/networking
######################################
########################################
# /etc/init.d/network-manager
########################################
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel