Commit a5cca5e8 authored by Lennart Poettering's avatar Lennart Poettering Committed by Ray Strode

systemd: install a gdm.service unit file by default

https://fedoraproject.org/wiki/Features/DisplayManagerRework

Some changes by Ray Strode.

https://bugzilla.gnome.org/show_bug.cgi?id=681339
parent 42ef43e6
......@@ -276,6 +276,10 @@ AC_ARG_WITH(systemd,
AS_HELP_STRING([--with-systemd],
[Add systemd support @<:@default=auto@:>@]),
[with_systemd=$withval], [with_systemd=auto])
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
[Directory for systemd service files]),
[with_systemdsystemunitdir=$withval], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
AC_ARG_WITH(plymouth,
AS_HELP_STRING([--with-plymouth],
[Add plymouth support @<:@default=auto@:>@]),
......@@ -942,6 +946,11 @@ AC_PATH_PROG(SYSTEMD_X_SERVER, systemd-multi-seat-x, [/lib/systemd/systemd-multi
AC_SUBST(SYSTEMD_X_SERVER)
AC_DEFINE_UNQUOTED(SYSTEMD_X_SERVER,"$SYSTEMD_X_SERVER",[Path to systemd X server wrapper])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST(SYSTEMD_SYSTEM_UNIT_DIR, [$with_systemdsystemunitdir])
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno -a "x$use_systemd" = "xyes" ])
dnl ---------------------------------------------------------------------------
dnl - Check for plymouth support
dnl ---------------------------------------------------------------------------
......@@ -1569,6 +1578,7 @@ echo \
XDMCP support: ${XDMCP_SUPPORT}
ConsoleKit support: ${use_console_kit}
systemd support: ${use_systemd}
systemd unit dir: ${with_systemdsystemunitdir}
plymouth support: ${use_plymouth}
UPower support: ${have_upower}
Build with RBAC: ${msg_rbac_shutdown}
......
/gdm.service
......@@ -150,6 +150,22 @@ MAINTAINERCLEANFILES = \
*~ \
Makefile.in
systemdsystemunit =
if HAVE_SYSTEMD
gdm.service: $(srcdir)/gdm.service.in
$(AM_V_GEN)sed \
-e 's,[@]sbindir[@],$(sbindir),g' \
-e 's,[@]GDM_INITIAL_VT[@],$(GDM_INITIAL_VT),g' \
< $< > $@
systemdsystemunit += gdm.service
CLEANFILES += gdm.service
endif
EXTRA_DIST += gdm.service.in
uninstall-hook:
rm -f \
$(DESTDIR)$(GDM_CUSTOM_CONF) \
......@@ -173,7 +189,13 @@ uninstall-hook:
$(DESTDIR)$(sysconfdir)/dconf/db \
$(DESTDIR)$(sysconfdir)/dconf
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstream-settings 00-upstream-settings-locks
if test -n "$(systemdsystemunit)"; then \
rm -f $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$(systemdsystemunit); \
rmdir $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) || : ; \
fi
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstream-settings 00-upstream-settings-locks $(systemdsystemunit)
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
$(mkinstalldirs) $(DESTDIR)$(gdmconfdir); \
chmod 755 $(DESTDIR)$(gdmconfdir); \
......@@ -253,6 +275,13 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr
chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
fi
if test -n "$(systemdsystemunit)" -a '!' -d $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); then \
$(mkinstalldirs) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); \
chmod 0755 $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); \
chown root:root $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) || : ; \
$(INSTALL_DATA) $(builddir)/$(systemdsystemunit) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$(systemdsystemunit); \
fi
if test '!' -d $(DESTDIR)$(screenshotdir); then \
$(mkinstalldirs) $(DESTDIR)$(screenshotdir); \
chmod 0755 $(DESTDIR)$(screenshotdir); \
......@@ -311,3 +340,4 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr
$(INSTALL_DATA) $(srcdir)/00-upstream-settings $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d
$(INSTALL_DATA) $(srcdir)/00-upstream-settings-locks $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks
test -z "$(DESTDIR)" && dconf update || :
[Unit]
Description=GNOME Display Manager
Conflicts=getty@tty@GDM_INITIAL_VT@.service plymouth-quit.service
After=systemd-user-sessions.service getty@tty@GDM_INITIAL_VT@.service plymouth-quit.service
[Service]
ExecStart=@sbindir@/gdm
Restart=always
IgnoreSIGPIPE=no
BusName=org.gnome.DisplayManager
[Install]
Alias=display-manager.service
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment