Date: Mon, 27 Sep 2004 10:11:38 +0200 From: "Jose M Rodriguez" <josemi@freebsd.jazztel.es> To: "Jose M Rodriguez" <josemi@freebsd.jazztel.es>, current@freebsd.org Cc: x11@freebsd.org Subject: Re: WIP: /etc/rc.d/xdm script Message-ID: <opsey7po156abrq7@localhost.redesjm.local> In-Reply-To: <opsey4zpbm6abrq7@localhost.redesjm.local> References: <opsey4zpbm6abrq7@localhost.redesjm.local>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Mon, 27 Sep 2004 09:12:51 +0200, Jose M Rodriguez
<josemi@freebsd.jazztel.es> wrote:
>
> 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
>
Take 2, most in the line of other rcNG scripts
--
josemi
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
[-- Attachment #2 --]
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 10:05:59 2004
@@ -4,17 +4,56 @@
#
# 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
+
+basecmd=`basename ${command}`
+basedir=""
+
+case basecmd 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
+ basedir="${command%/bin/gdm}"
+ required_files="${basedir}/etc/gdm/gdm.conf"
+ pidfile="/var/run/gdm.pid"
+ ;;
+ kdm)
+ # KDE kdm display manager
+ basedir="${command%/bin/kdm}"
+ required_files="${basedir}/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
+
+unset basecmd basedir
+
+# Place any needed extra config in /etc/rc.conf.d/xdm
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 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 #######################################
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsey7po156abrq7>
