diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | data/Makefile.am | 6 | ||||
-rw-r--r-- | data/NetworkManager-wait-online-systemd-pre200.service.in | 13 | ||||
-rw-r--r-- | data/NetworkManager-wait-online.service.in | 4 | ||||
-rw-r--r-- | data/NetworkManager.service.in | 2 |
5 files changed, 24 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 43e420faf9..84c76e02a5 100644 --- a/configure.ac +++ b/configure.ac @@ -267,6 +267,9 @@ if test "$with_systemdsystemunitdir" != no; then AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) fi +PKG_CHECK_MODULES(SYSTEMD_200, [systemd >= 200], [have_systemd_200=yes],[have_systemd_200=no]) +AM_CONDITIONAL(HAVE_SYSTEMD_200, test "${have_systemd_200}" = "yes") + # session tracking support AC_MSG_CHECKING([Session tracking support]) AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no], diff --git a/data/Makefile.am b/data/Makefile.am index 19b7b3eba3..df93f27742 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -8,8 +8,13 @@ systemdsystemunit_DATA = \ NetworkManager.service: NetworkManager.service.in $(edit) $< >$@ +if HAVE_SYSTEMD_200 NetworkManager-wait-online.service: NetworkManager-wait-online.service.in $(edit) $< >$@ +else +NetworkManager-wait-online.service: NetworkManager-wait-online-systemd-pre200.service.in + $(edit) $< >$@ +endif NetworkManager-dispatcher.service: NetworkManager-dispatcher.service.in $(edit) $< >$@ @@ -38,6 +43,7 @@ edit = sed \ EXTRA_DIST = \ NetworkManager.service.in \ NetworkManager-wait-online.service.in \ + NetworkManager-wait-online-systemd-pre200.service.in \ NetworkManager-dispatcher.service.in \ org.freedesktop.NetworkManager.service.in \ server.conf.in diff --git a/data/NetworkManager-wait-online-systemd-pre200.service.in b/data/NetworkManager-wait-online-systemd-pre200.service.in new file mode 100644 index 0000000000..fd9be418ea --- /dev/null +++ b/data/NetworkManager-wait-online-systemd-pre200.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Network Manager Wait Online +Requisite=NetworkManager.service +After=NetworkManager.service +Wants=network.target +Before=network.target + +[Service] +Type=oneshot +ExecStart=@bindir@/nm-online -q --timeout=30 + +[Install] +WantedBy=network.target diff --git a/data/NetworkManager-wait-online.service.in b/data/NetworkManager-wait-online.service.in index fd9be418ea..b81c5b023c 100644 --- a/data/NetworkManager-wait-online.service.in +++ b/data/NetworkManager-wait-online.service.in @@ -3,11 +3,11 @@ Description=Network Manager Wait Online Requisite=NetworkManager.service After=NetworkManager.service Wants=network.target -Before=network.target +Before=network.target network-online.target [Service] Type=oneshot ExecStart=@bindir@/nm-online -q --timeout=30 [Install] -WantedBy=network.target +WantedBy=multi-user.target diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in index f1a2b09b14..012f87261b 100644 --- a/data/NetworkManager.service.in +++ b/data/NetworkManager.service.in @@ -1,6 +1,5 @@ [Unit] Description=Network Manager -After=syslog.target Wants=network.target Before=network.target @@ -14,5 +13,4 @@ KillMode=process [Install] WantedBy=multi-user.target Alias=dbus-org.freedesktop.NetworkManager.service -Also=NetworkManager-wait-online.service |