Date: Thu, 23 Dec 2010 05:58:43 GMT From: Doug Barton <dougb@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/153392: Update rc.d script for x11/slim Message-ID: <201012230558.oBN5whQw007027@freefall.freebsd.org> Resent-Message-ID: <201012230600.oBN60Git007122@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 153392 >Category: ports >Synopsis: Update rc.d script for x11/slim >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 23 06:00:16 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Doug Barton >Release: FreeBSD 8.1-STABLE i386 >Organization: AAAG >Environment: DNA >Description: The script is currently unable to stop slim effectively because the X server instance will hang it. This patch adds a prestop method to fix that. >How-To-Repeat: Start slim, attempt to stop it with the rc.d script >Fix: Apply the following patch: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/x11/slim/Makefile,v retrieving revision 1.23 diff -u -r1.23 Makefile --- Makefile 20 Aug 2010 09:31:32 -0000 1.23 +++ Makefile 23 Dec 2010 05:54:42 -0000 @@ -7,6 +7,7 @@ PORTNAME= slim PORTVERSION= 1.3.2 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_BERLIOS} \ http://depot.fsck.ch/mirror/distfiles/ Index: files/slim.sh.in =================================================================== RCS file: /home/pcvs/ports/x11/slim/files/slim.sh.in,v retrieving revision 1.4 diff -u -r1.4 slim.sh.in --- files/slim.sh.in 27 Mar 2010 00:15:23 -0000 1.4 +++ files/slim.sh.in 23 Dec 2010 05:54:42 -0000 @@ -1,9 +1,11 @@ #!/bin/sh +# $FreeBSD$ +# # PROVIDE: slim # REQUIRE: LOGIN +# KEYWORD: shutdown -# # Add the following lines to /etc/rc.conf to enable slim: # slim_enable (bool): Set to "NO" by default. # Set it to "YES" to enable slim @@ -11,13 +13,15 @@ # Alternatively, edit /etc/ttys and change the line below # ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure # to this: -# ttyv8 "/usr/local/bin/slim" xterm on secure +# ttyv8 "%%PREFIX%%/bin/slim" xterm on secure . /etc/rc.subr name="slim" rcvar=`set_rcvar` +stop_precmd=${name}_prestop + load_rc_config $name : ${slim_enable="NO"} @@ -26,4 +30,12 @@ command_args="-d" pidfile=/var/run/slim.pid +slim_prestop () +{ + local xpid + + xpid=`ps -axww | grep '/bin/[X] .* -auth /var/run/slim.auth'` + kill ${xpid%% *} +} + run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012230558.oBN5whQw007027>