~ruther/guix-local

47b73c34f0ac1fbe2cacb9233e7e41cdcfef9caf — Ludovic Courtès 11 years ago da9c810
services: xorg: Remove /var/run/slim.lock when starting.

Reported by Mark H. Weaver.

* gnu/services/xorg.scm (slim-service)[start]: Remove /var/run/slim.lock
  before starting 'slim'.
1 files changed, 9 insertions(+), 4 deletions(-)

M gnu/services/xorg.scm
M gnu/services/xorg.scm => gnu/services/xorg.scm +9 -4
@@ 146,10 146,15 @@ reboot_cmd " dmd "/sbin/reboot
      (provision '(xorg-server))
      (requirement '(user-processes host-name udev))
      (start
       #~(make-forkexec-constructor
          (list (string-append #$slim "/bin/slim") "-nodaemon")
          #:environment-variables
          (list (string-append "SLIM_CFGFILE=" #$slim.cfg))))
       #~(lambda ()
           ;; A stale lock file can prevent SLiM from starting, so remove it
           ;; to be on the safe side.
           (false-if-exception (delete-file "/var/run/slim.lock"))

           (fork+exec-command
            (list (string-append #$slim "/bin/slim") "-nodaemon")
            #:environment-variables
            (list (string-append "SLIM_CFGFILE=" #$slim.cfg)))))
      (stop #~(make-kill-destructor))
      (respawn? #t)
      (pam-services