aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorwoodsb02 <woodsb02@FreeBSD.org>2017-02-13 00:36:59 +0800
committerwoodsb02 <woodsb02@FreeBSD.org>2017-02-13 00:36:59 +0800
commitf6e46752a81851705f8276f69749da6734b0687f (patch)
tree975b32b9a43ebc8110c85923d6f0a5c7a8f6c452 /x11
parentf48529076063d9c9ed78af94f020cb3a1ecc02ed (diff)
downloadfreebsd-ports-gnome-f6e46752a81851705f8276f69749da6734b0687f.tar.gz
freebsd-ports-gnome-f6e46752a81851705f8276f69749da6734b0687f.tar.zst
freebsd-ports-gnome-f6e46752a81851705f8276f69749da6734b0687f.zip
x11/lightdm: Improve rc script to use daemon(8)
This fixes an issue noticed when sysutils/bsdstats was installed and enabled at runtime in /etc/rc.conf, but for whatever reason was failing to send the updated statistics. Upon failing, the lightdm process would receive a SIGHUP, causing it to stop seconds after the login screen was displayed (before the user even had a chance to login).
Diffstat (limited to 'x11')
-rw-r--r--x11/lightdm/Makefile2
-rw-r--r--x11/lightdm/files/lightdm.in5
2 files changed, 4 insertions, 3 deletions
diff --git a/x11/lightdm/Makefile b/x11/lightdm/Makefile
index 9017e1a05399..4557667482d7 100644
--- a/x11/lightdm/Makefile
+++ b/x11/lightdm/Makefile
@@ -3,7 +3,7 @@
PORTNAME= lightdm
PORTVERSION= 1.20.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11
MASTER_SITES= https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/
diff --git a/x11/lightdm/files/lightdm.in b/x11/lightdm/files/lightdm.in
index 227abd106976..734276d218b0 100644
--- a/x11/lightdm/files/lightdm.in
+++ b/x11/lightdm/files/lightdm.in
@@ -22,8 +22,9 @@ load_rc_config ${name}
: ${lightdm_enable:="NO"}
-command="%%PREFIX%%/sbin/${name}"
+command="/usr/sbin/daemon"
+procname="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
-command_args="--pid-file=${pidfile} > /dev/null 2>&1 &"
+command_args="-f ${procname} --pid-file=${pidfile}"
run_rc_command "$1"