Date: Mon, 27 Sep 2004 20:05:33 +0200 From: "Jose M Rodriguez" <josemi@freebsd.jazztel.es> To: x11@freebsd.org Subject: Fwd: WIP: /etc/rc.d/xdm Working patch for test. Message-ID: <opsezy7js06abrq7@localhost.redesjm.local> In-Reply-To: <opsezvk2fj6abrq7@localhost.redesjm.local> References: <opsezvk2fj6abrq7@localhost.redesjm.local>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Can someone of x11@ try this. Any comments are welcome.
--
josemi
------- Forwarded message -------
From: "Jose M Rodriguez" <josemi@freebsd.jazztel.es>
To: current@freebsd.org
Subject: WIP: /etc/rc.d/xdm Working patch for test.
Date: Mon, 27 Sep 2004 18:47:16 +0200
Well, this is the frist working patch for a /etc/rc.d/xdm script.
To workaround de init/xdm race problem, I rename the script to 0xdm, and
is now even closest to the end of rcorder than local.
So, now, this script can:
- launch Xorg/gdm/kdm/xdm from /etc/rc.conf
- launch it from boot without init (/etc/ttys) race problems
- doesn't affect previous /etc/ttys or /usr/X11R6/ets/rc.d/gdm.sh xdm
launchs.
- xmd start/stop via /erc/rc.d/0xdm start ...
- admit more elaborate launch via /etc/rc.conf.d/xdm
- aply patch:
# cd /usr/src && patch -p0 < path-xdm4
+ check no xdm and 0xdm
+ update /etc/rc.d
- xdm launch
# echo 'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start
- gdm launch
# echo 'xdm_program="/usr/X11R6/bin/gdm" >> /etc/rc.conf && echo
'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start
- kdm launch
# echo 'xdm_program="/usr/local/bin/kdm" >> /etc/rc.conf && echo
'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start
- Xorg XDMCP broadcast
# echo 'xdm_program="/usr/X11R6/bin/Xorg" >> /etc/rc.conf && echo
'xdm_enable="YES" >> /etc/rc.conf && /etc/rc.d/0xdm start
Now ready for test.
--
josemi
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
[-- Attachment #2 --]
diff -Nru /usr/src/etc/rc.d/0xdm etc/rc.d/0xdm
--- /usr/src/etc/rc.d/0xdm Thu Jan 1 01:00:00 1970
+++ etc/rc.d/0xdm Mon Sep 27 18:19:57 2004
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# $NetBSD: xdm,v 1.5 2000/07/17 15:24:48 lukem Exp $
+#
+
+# PROVIDE: xdm
+# REQUIRE: DAEMON LOGIN syscons moused
+# KEYWORD: FreeBSD nojail shutdown
+
+. /etc/rc.subr
+
+name="xdm"
+rcvar=`set_rcvar`
+
+# Place any needed extra config in /etc/rc.conf.d/xdm
+load_rc_config $name
+
+command="${xdm_program:-/usr/X11R6/bin/xdm}"
+
+# a good ENV for a X11 App, we are in our subshell
+HOME="/root"
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin"
+export PATH HOME
+
+case `basename ${command}` in
+ xdm)
+ # xdm standard display manager
+ : ${required_files:=/usr/X11R6/lib/X11/xdm/xdm-config}
+ : ${pidfile:=/var/run/xdm.pid}
+ : ${extra_commands:="reload"}
+ ;;
+ gdm)
+ # gnome gdm display manager
+ : ${required_files:=${command%/bin/gdm}/etc/gdm/gdm.conf}
+ : ${pidfile:=/var/run/gdm.pid}
+ : ${procname:=${command}-binary}
+ ;;
+ kdm)
+ # KDE kdm display manager
+ : ${required_files:=${command%/bin/kdm}/share/config/kdm/kdmrc}
+ : ${pidfile:=/var/run/kdm.pid}
+ # don't use start_precmd(). We have local genkdmconf.sh now
+ ;;
+ Xorg)
+ # xdm login via Xorg broadcast XDMCP
+ : ${required_files:=/etc/X11/xorg.conf}
+ : ${xdm_flags:=-broadcast &}
+ ;;
+ Xfree86)
+ # xdm login via Xfree86 broadcast XDMCP
+ : ${required_files:=/etc/X11/XF86Config}
+ : ${xdm_flags:=-broadcast &}
+ ;;
+esac
+
+run_rc_command "$1"
diff -Nru /usr/src/etc/rc.d/Makefile etc/rc.d/Makefile
--- /usr/src/etc/rc.d/Makefile Mon May 24 16:17:19 2004
+++ etc/rc.d/Makefile Mon Sep 27 06:06:48 2004
@@ -37,6 +37,7 @@
usbd \
var vinum virecover \
watchdogd \
+ 0xdm xfs \
ypbind yppasswdd ypserv \
ypset ypupdated ypxfrd
FILESDIR= /etc/rc.d
diff -Nru /usr/src/etc/rc.d/xdm etc/rc.d/xdm
--- /usr/src/etc/rc.d/xdm Sat Jun 16 09:16:14 2001
+++ etc/rc.d/xdm Thu Jan 1 01:00:00 1970
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: xdm,v 1.5 2000/07/17 15:24:48 lukem Exp $
-#
-
-# PROVIDE: xdm
-# REQUIRE: DAEMON LOGIN wscons
-# KEYWORD: shutdown
-
-. /etc/rc.subr
-
-name="xdm"
-rcvar=$name
-command="/usr/X11R6/bin/${name}"
-pidfile="/var/run/${name}.pid"
-required_files="/usr/X11R6/lib/X11/xdm/xdm-config"
-extra_commands="reload"
-
-load_rc_config $name
-run_rc_command "$1"
diff -Nru /usr/src/etc/rc.d/xfs etc/rc.d/xfs
--- /usr/src/etc/rc.d/xfs Fri Jun 14 00:14:36 2002
+++ etc/rc.d/xfs Mon Sep 27 12:59:51 2004
@@ -7,11 +7,12 @@
# PROVIDE: xfs
# REQUIRE: mountall cleartmp
# BEFORE: LOGIN
+# KEYWORD: FreeBSD
. /etc/rc.subr
name="xfs"
-rcvar=$name
+rcvar=`set_rcvar`
command="/usr/X11R6/bin/${name}"
command_args="& sleep 2"
required_files="/usr/X11R6/lib/X11/fs/config"
diff -Nru /usr/src/etc/defaults/rc.conf etc/defaults/rc.conf
--- /usr/src/etc/defaults/rc.conf Sun Sep 26 05:10:09 2004
+++ etc/defaults/rc.conf Mon Sep 27 06:16:54 2004
@@ -467,6 +467,8 @@
economy_cx_lowest="LOW" # Offline CPU idle state
economy_throttle_state="HIGH" # Offline throttling state
virecover_enable="YES" # Perform housekeeping for the vi(1) editor
+xdm_enable="NO" # Start the X11 Display Manager
+xfs_enable="NO" # Start the X11 Font Server
##############################################################
### Jail Configuration #######################################
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsezy7js06abrq7>
