diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-07-24 19:38:50 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-24 23:02:26 +0200 |
commit | 47b73c34f0ac1fbe2cacb9233e7e41cdcfef9caf (patch) | |
tree | 51266d00bef54cfd3bfb36eb490b54a65e595984 /gnu | |
parent | da9c810280c66b3c71699131fb09820cd0b275cf (diff) | |
download | patches-47b73c34f0ac1fbe2cacb9233e7e41cdcfef9caf.tar patches-47b73c34f0ac1fbe2cacb9233e7e41cdcfef9caf.tar.gz |
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'.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/xorg.scm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 7ca0d3f7db..04d1296edc 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -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 |