summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-03-07 00:01:03 +0100
committerLudovic Courtès <ludo@gnu.org>2016-03-07 00:01:03 +0100
commit956ad60cadbea000c1247afee91f48ca2e33c14d (patch)
treeed2fc0c92148b7366d0f6aee3cffab56baa413db /gnu/services
parentef8de9852eeb9f9ce8e01a2a4f60a057b890b94a (diff)
services: elogind: Rely on D-Bus activation.
Previously elogind was explicitly spawned by the Shepherd. Now it is activated by dbus-daemon on demand. * gnu/packages/freedesktop.scm (elogind)[arguments]: Add 'fix-service-file' phase. * gnu/services/desktop.scm (elogind-shepherd-service): Remove. (elogind-dbus-service): New procedure. (elogind-service-type): Do not extend SHEPHERD-ROOT-SERVICE-TYPE. Use 'elogind-dbus-service' for DBUS-ROOT-SERVICE-TYPE.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/desktop.scm27
1 files changed, 7 insertions, 20 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 02bcf1b19f..c20569ffde 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -647,22 +647,11 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
("HybridSleepState" (sleep-list elogind-hybrid-sleep-state))
("HybridSleepMode" (sleep-list elogind-hybrid-sleep-mode))))
-(define (elogind-shepherd-service config)
- "Return a shepherd service for elogind, using @var{config}."
- ;; TODO: We could probably rely on service activation but the '.service'
- ;; file currently contains an erroneous 'Exec' line.
- (let ((config-file (elogind-configuration-file config))
- (elogind (elogind-package config)))
- (list (shepherd-service
- (documentation "Run the elogind login and seat management service.")
- (provision '(elogind))
- (requirement '(dbus-system))
-
- (start #~(make-forkexec-constructor
- (list (string-append #$elogind "/libexec/elogind/elogind"))
- #:environment-variables
- (list (string-append "ELOGIND_CONF_FILE=" #$config-file))))
- (stop #~(make-kill-destructor))))))
+(define (elogind-dbus-service config)
+ (list (wrapped-dbus-service (elogind-package config)
+ "libexec/elogind/elogind"
+ "ELOGIND_CONF_FILE"
+ (elogind-configuration-file config))))
(define (pam-extension-procedure config)
"Return an extension for PAM-ROOT-SERVICE-TYPE that ensures that all the PAM
@@ -683,10 +672,8 @@ seats.)"
(define elogind-service-type
(service-type (name 'elogind)
(extensions
- (list (service-extension shepherd-root-service-type
- elogind-shepherd-service)
- (service-extension dbus-root-service-type
- (compose list elogind-package))
+ (list (service-extension dbus-root-service-type
+ elogind-dbus-service)
(service-extension udev-service-type
(compose list elogind-package))
(service-extension polkit-service-type