From owner-freebsd-x11@FreeBSD.ORG Tue Nov 16 15:21:52 2004 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E13A16A4CE; Tue, 16 Nov 2004 15:21:52 +0000 (GMT) Received: from smtp1.jazztel.es (smtp1.jazztel.es [62.14.3.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 730B743D5C; Tue, 16 Nov 2004 15:21:51 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from antivirus by smtp1.jazztel.es with antivirus id 1CU59j-0000ZX-00 Tue, 16 Nov 2004 16:22:07 +0100 Received: from [212.106.252.3] (helo=rguez.homeunix.net) by smtp1.jazztel.es with esmtp id 1CU59j-0000X0-00 Tue, 16 Nov 2004 16:22:07 +0100 Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) by rguez.homeunix.net (8.13.1/8.13.1) with ESMTP id iAGFLjV5000433; Tue, 16 Nov 2004 16:21:45 +0100 (CET) (envelope-from freebsd@redesjm.local) Received: (from freebsd@localhost) by redesjm.local (8.13.1/8.13.1/Submit) id iAGFLlWD006618; Tue, 16 Nov 2004 16:21:47 +0100 (CET) (envelope-from freebsd) Date: Tue, 16 Nov 2004 16:21:47 +0100 (CET) Message-Id: <200411161521.iAGFLlWD006618@redesjm.local> To: FreeBSD-gnats-submit@freebsd.org From: Jose M Rodriguez X-send-pr-version: 3.113 X-GNATS-Notify: X-AntiVirus: checked by AntiVir Milter (version: 1.1; AVE: 6.28.0.12; VDF: 6.28.0.59; host: antares.redesjm.local) X-Virus-Scanned: by antivirus cc: x11@freebsd.org Subject: [PATCH] add xdm rc script X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jose M Rodriguez List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 15:21:52 -0000 >Submitter-Id: current-users >Originator: Jose M Rodriguez >Organization: RedesJM >Confidential: no >Synopsis: [PATCH] add xdm rc script >Severity: non-critical >Priority: low >Category: ports >Class: change-request >Release: FreeBSD 5.3-STABLE i386 >Environment: System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Nov 16 13:26:33 CET 2004 root@orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386 >Description: XFree86-4 equivalent of ports/74000 >How-To-Repeat: >Fix: --- patch-XFree86-4-clients begins here --- diff -Nru /usr/ports/x11/XFree86-4-clients/Makefile x11/XFree86-4-clients/Makefile --- /usr/ports/x11/XFree86-4-clients/Makefile Fri Nov 5 03:47:23 2004 +++ x11/XFree86-4-clients/Makefile Tue Nov 16 16:15:02 2004 @@ -7,7 +7,7 @@ PORTNAME= clients PORTVERSION= 4.4.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XFREE} MASTER_SITE_SUBDIR= ${PORTVERSION} @@ -26,6 +26,7 @@ Xcursor.1:${PORTSDIR}/x11/XFree86-4-libraries \ png.5:${PORTSDIR}/graphics/png \ Xft.2:${PORTSDIR}/x11-fonts/libXft +USE_RC_SUBR= yes CONFLICTS= xorg-clients-[0-9]* @@ -73,7 +74,18 @@ @${ECHO_MSG} "setuid. If you want to do this, hit Ctrl-C now and use \"make WITH_SETUID_LUIT=yes\"" .endif +pre-install: +# create an rcNG xdm.sh + @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ + -e 's|%%X11BASE%%|${X11BASE}|g' \ + -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + ${FILESDIR}/xdm.sh > ${WRKDIR}/xdm.sh + post-install: +# install an xdm.sh etc/rc.d script + @${INSTALL_SCRIPT} ${WRKDIR}/xdm.sh ${PREFIX}/etc/rc.d + @${LN} -sf ${X11BASE}/bin/resize-static ${X11BASE}/bin/resize @${LN} -sf ${X11BASE}/bin/xterm-static ${X11BASE}/bin/xterm @${LN} -sf ${X11BASE}/bin/uxterm-static ${X11BASE}/bin/uxterm diff -Nru /usr/ports/x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile --- /usr/ports/x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile Thu Jan 1 01:00:00 1970 +++ x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile Tue Nov 16 16:13:32 2004 @@ -0,0 +1,13 @@ +--- programs/xdm/config/Imakefile.orig Tue Nov 16 16:08:41 2004 ++++ programs/xdm/config/Imakefile Tue Nov 16 16:10:20 2004 +@@ -17,6 +17,10 @@ + DEFAULTVT=vt7 + #endif + ++#if defined(FreeBSDArchitecture) ++DEFAULTVT=vt9 ++#endif ++ + #ifndef XdmPixmap + # define XdmPixmap XFree86.xpm + # define XdmbwPixmap XFree86bw.xpm diff -Nru /usr/ports/x11/XFree86-4-clients/files/xdm.sh x11/XFree86-4-clients/files/xdm.sh --- /usr/ports/x11/XFree86-4-clients/files/xdm.sh Thu Jan 1 01:00:00 1970 +++ x11/XFree86-4-clients/files/xdm.sh Tue Nov 16 10:51:18 2004 @@ -0,0 +1,71 @@ +#!/bin/sh +# +# $Id$ +# + +# PROVIDE: xdm +# REQUIRE: DAEMON LOGIN syscons moused +# KEYWORD: nojail shutdown + +# rcNG launch script for xdm +# +# Notes: +# this scripts implements an alternate method to launch xdm +# +# To activate this, you must define xdm_enable="YES" in rc.conf +# in /etc/rc.conf[.local] +# +# This script can: +# - launch gdm using xdm_program="%%X11BASE%%/bin/gdm" +# - launch kdm using xdm_program="%%LOCALBASE%%/bin/kdm" +# - launch Xorg XDMCP client using xdm_program="%%X11BASE%%/bin/XFree86" +# +# You may use /etc/rc.conf.d/xdm to use more advanced launch control +# like a start_precmd script + +# Basic config +name="xdm" +xdm_enable="NO" +xdm_program="%%PREFIX%%/bin/xdm" + +. %%RC_SUBR%% + +rcvar=`set_rcvar` + +# get the config from /etc/rc.conf[.local] && /etc/rc.conf.d/xdm +load_rc_config $name + +command="${xdm_program:-%%PREFIX%%/bin/xdm}" + +# a good ENV for a X11 App, we are in our subshell +HOME="/root" +PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin:%%X11BASE%%/bin" +export PATH HOME + +case `basename ${command}` in + xdm) + # xdm standard display manager + : ${required_files:=%%PREFIX%%/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 + ;; + XFree86) + # xdm login via Xorg broadcast XDMCP + : ${required_files:=/etc/X11/XF86Config} + : ${xdm_flags:=-broadcast &} + ;; +esac + +run_rc_command "$1" diff -Nru /usr/ports/x11/XFree86-4-clients/pkg-plist x11/XFree86-4-clients/pkg-plist --- /usr/ports/x11/XFree86-4-clients/pkg-plist Mon Aug 23 13:02:09 2004 +++ x11/XFree86-4-clients/pkg-plist Tue Nov 16 10:47:41 2004 @@ -118,6 +118,7 @@ bin/xwd bin/xwininfo bin/xwud +etc/rc.d/xdm.sh include/X11/bitmaps/Dashes include/X11/bitmaps/Down include/X11/bitmaps/Excl --- patch-XFree86-4-clients ends here ---