systemd: update for network-online.target for systemd >= 200 (rh #787314)
systemd's new network-online target abstracts the "wait until networking is up" stuff, and NM-wait-online implements that functionality. Thus NM-wait-online should be ordered before (and thus be a dependency of) network-online.
This commit is contained in:
@@ -267,6 +267,9 @@ if test "$with_systemdsystemunitdir" != no; then
|
|||||||
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
||||||
fi
|
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
|
# session tracking support
|
||||||
AC_MSG_CHECKING([Session tracking support])
|
AC_MSG_CHECKING([Session tracking support])
|
||||||
AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no],
|
AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no],
|
||||||
|
@@ -8,8 +8,13 @@ systemdsystemunit_DATA = \
|
|||||||
NetworkManager.service: NetworkManager.service.in
|
NetworkManager.service: NetworkManager.service.in
|
||||||
$(edit) $< >$@
|
$(edit) $< >$@
|
||||||
|
|
||||||
|
if HAVE_SYSTEMD_200
|
||||||
NetworkManager-wait-online.service: NetworkManager-wait-online.service.in
|
NetworkManager-wait-online.service: NetworkManager-wait-online.service.in
|
||||||
$(edit) $< >$@
|
$(edit) $< >$@
|
||||||
|
else
|
||||||
|
NetworkManager-wait-online.service: NetworkManager-wait-online-systemd-pre200.service.in
|
||||||
|
$(edit) $< >$@
|
||||||
|
endif
|
||||||
|
|
||||||
NetworkManager-dispatcher.service: NetworkManager-dispatcher.service.in
|
NetworkManager-dispatcher.service: NetworkManager-dispatcher.service.in
|
||||||
$(edit) $< >$@
|
$(edit) $< >$@
|
||||||
@@ -38,6 +43,7 @@ edit = sed \
|
|||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
NetworkManager.service.in \
|
NetworkManager.service.in \
|
||||||
NetworkManager-wait-online.service.in \
|
NetworkManager-wait-online.service.in \
|
||||||
|
NetworkManager-wait-online-systemd-pre200.service.in \
|
||||||
NetworkManager-dispatcher.service.in \
|
NetworkManager-dispatcher.service.in \
|
||||||
org.freedesktop.NetworkManager.service.in \
|
org.freedesktop.NetworkManager.service.in \
|
||||||
server.conf.in
|
server.conf.in
|
||||||
|
13
data/NetworkManager-wait-online-systemd-pre200.service.in
Normal file
13
data/NetworkManager-wait-online-systemd-pre200.service.in
Normal file
@@ -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
|
@@ -3,11 +3,11 @@ Description=Network Manager Wait Online
|
|||||||
Requisite=NetworkManager.service
|
Requisite=NetworkManager.service
|
||||||
After=NetworkManager.service
|
After=NetworkManager.service
|
||||||
Wants=network.target
|
Wants=network.target
|
||||||
Before=network.target
|
Before=network.target network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=@bindir@/nm-online -q --timeout=30
|
ExecStart=@bindir@/nm-online -q --timeout=30
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=network.target
|
WantedBy=multi-user.target
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Network Manager
|
Description=Network Manager
|
||||||
After=syslog.target
|
|
||||||
Wants=network.target
|
Wants=network.target
|
||||||
Before=network.target
|
Before=network.target
|
||||||
|
|
||||||
@@ -14,5 +13,4 @@ KillMode=process
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias=dbus-org.freedesktop.NetworkManager.service
|
Alias=dbus-org.freedesktop.NetworkManager.service
|
||||||
Also=NetworkManager-wait-online.service
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user