summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11/xdm/Makefile1
-rw-r--r--x11/xdm/files/xdm.in30
2 files changed, 31 insertions, 0 deletions
diff --git a/x11/xdm/Makefile b/x11/xdm/Makefile
index a4dfeae2b1b7..e4be388fa86e 100644
--- a/x11/xdm/Makefile
+++ b/x11/xdm/Makefile
@@ -14,6 +14,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
USES= cpe libtool xorg xorg-cat:app
USE_LDCONFIG= yes
USE_XORG= x11 xau xaw xdmcp xext xinerama xmu xpm xrender xt
+USE_RC_SUBR= xdm
CPE_PRODUCT= x_display_manager
CPE_VENDOR= x
diff --git a/x11/xdm/files/xdm.in b/x11/xdm/files/xdm.in
new file mode 100644
index 000000000000..e86171917abd
--- /dev/null
+++ b/x11/xdm/files/xdm.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: xdm
+# REQUIRE: LOGIN moused
+# KEYWORD: nojail shutdown
+#
+# Add the following line to /etc/rc.conf to enable xdm:
+# xdm_enable="YES"
+#
+# Alternatively, edit /etc/ttys and change the line below
+# ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
+# to this:
+# ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
+
+. /etc/rc.subr
+
+name="xdm"
+rcvar=xdm_enable
+desc="X.org X display manager"
+
+load_rc_config $name
+
+: ${xdm_enable:=NO}
+
+command=%%PREFIX%%/bin/$name
+pidfile=/var/run/$name.pid
+
+run_rc_command $1