Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2004 09:12:51 +0200
From:      "Jose M Rodriguez" <josemi@freebsd.jazztel.es>
To:        current@freebsd.org
Cc:        x11@freebsd.org
Subject:   WIP: /etc/rc.d/xdm script
Message-ID:  <opsey4zpbm6abrq7@localhost.redesjm.local>

next in thread | raw e-mail | index | archive | help
------------4XitYvaje38fgfW3a1QlmV
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


Maybe something in the way of this patch a good start for /etc/rc.d/xdm
I also make xfs operative, but I think that, right now, nfs will do the  
task.
None of them have been tested.  It's only for comments.

Thanks in advance,
--
   josemi

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
------------4XitYvaje38fgfW3a1QlmV
Content-Disposition: attachment; filename=patch-xdm
Content-Type: application/octet-stream; name=patch-xdm
Content-Transfer-Encoding: 8bit

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 \
+	xdm 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	Mon Sep 27 08:59:34 2004
@@ -4,17 +4,59 @@
 #
 
 # PROVIDE: xdm
-# REQUIRE: DAEMON LOGIN wscons
-# KEYWORD: shutdown
+# REQUIRE: DAEMON LOGIN syscons moused
+# KEYWORD: FreeBSD 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"
+command="${xdm_program:-/usr/X11R6/bin/xdm}"
 
+# a good ENV for a X11 App, we are in our subshell
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin"
+export PATH
+
+# Place any needed extra config in /etc/rc.conf.d/xdm
 load_rc_config $name
+
+basecmd=`basename ${command}`
+basedir=""
+
+case basecmd in
+	xdm)
+		# xdm standard display manager
+		basedir="/usr/X11R6/lib/X11"
+		: ${required_files:=${basedir}/xdm/xdm-config}
+		: ${pidfile:=/var/run/${basecmd}.pid}
+		: ${extra_commands:=reload}
+		;;
+	gdm)
+		# gnome gdm display manager
+		basedir="${command%/bin/gdm}"
+		: ${required_files:=${basedir}/etc/gdm/gdm.conf}
+		: ${pidfile:=/var/run/${basecmd}.pid}
+		;;
+	kdm)
+		# KDE kdm display manager
+		basedir="${command%/bin/kdm}"
+		: ${required_files:=${basedir}/share/config/kdm/kdmrc}
+		: ${pidfile:=/var/run/${basecmd}.pid}
+		# don't use start_precmd().  We have local genkdmconf.sh now
+		;;
+	Xorg)
+		# xdm login via Xorg broadcast XDMCP
+		basedir="/etc/X11"
+		: ${required_files:=${basedir}/xorg.conf}
+		: ${xdm_flags:=-broadcast}
+		;;
+	Xfree86)
+		# xdm login via Xfree86 broadcast XDMCP
+		basedir="/etc/X11"
+		: ${required_files:=${basedir}/XF86Config}
+		: ${xdm_flags:=-broadcast}
+		;;
+esac
+
+# XXX ? unset basecmd basedir
 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 06:08:34 2004
@@ -7,6 +7,7 @@
 # PROVIDE: xfs
 # REQUIRE: mountall cleartmp
 # BEFORE:  LOGIN
+# KEYWORD: FreeBSD
 
 . /etc/rc.subr
 
diff -Nru /usr/src/etc/defaults/rc.conf etc/defaults/rc.conf
--- /usr/src/etc/defaults/rc.conf	Sun Sep 26 11:30:22 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 #######################################

------------4XitYvaje38fgfW3a1QlmV--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsey4zpbm6abrq7>