From rivers@dignus.com Wed Jul 22 07:40:00 1998 Received: from elvis.vnet.net (elvis.vnet.net [166.82.1.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA11666 for ; Wed, 22 Jul 1998 07:39:55 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by elvis.vnet.net (8.8.8/8.8.4) with ESMTP id KAA29512 for ; Wed, 22 Jul 1998 10:39:29 -0400 (EDT) Received: from lakes.dignus.com (lakes [10.0.0.3]) by dignus.com (8.8.8/8.8.5) with ESMTP id LAA01795 for ; Wed, 22 Jul 1998 11:11:23 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.8.8/8.6.9) id KAA00383; Wed, 22 Jul 1998 10:43:32 -0400 (EDT) Message-Id: <199807221443.KAA00383@lakes.dignus.com> Date: Wed, 22 Jul 1998 10:43:32 -0400 (EDT) From: Thomas David Rivers Reply-To: rivers@dignus.com To: FreeBSD-gnats-submit@freebsd.org Subject: /tmp/.X* not removed by /etc/rc if clear_tmp_enable != YES X-Send-Pr-Version: 3.2 >Number: 7366 >Category: conf >Synopsis: /tmp/.X* not removed by /etc/rc if clear_tmp_enable != YES >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 22 07:40:01 PDT 1998 >Closed-Date: Mon Sep 7 19:18:56 MEST 1998 >Last-Modified: Mon Sep 7 19:20:06 MEST 1998 >Originator: Thomas David Rivers >Release: FreeBSD 2.2.6-RELEASE i386 >Organization: Dignus LLC >Environment: 2.2.6 - X11. >Description: if clear_tmp_enable is YES, then /etc/rc kindly removes /tmp/.X*-lock and /tmp/.X11-unix/* But - if clea_tmp_enable isn't yes; then these don't get removed; causing X11 startup to fail on reboot. >How-To-Repeat: >Fix: I suggest the following diff to /etc/rc; which always removes those files. It's arguable that if the user didn't set clear_tmp_enable to YES; he indicates he wants these files; but I don't believe the intent of clear_tmp_enable includes preventing X11 from restarting... [The best fix would likely be to get XFree86 to place the files in /var/run.] This is a context diff to /etc/rc: *** rc.ori Tue Mar 24 20:56:48 1998 --- rc Wed Jul 22 10:42:09 1998 *************** *** 131,136 **** --- 131,139 ---- rm -f /etc/nologin rm -f /var/spool/lock/* rm -rf /var/spool/uucp/.Temp/* + # Also remove X lock files since it will prevent you from + # restarting X11 after a system crash. + rm -f /tmp/.X*-lock /tmp/.X11-unix/* (cd /var/run && { cp /dev/null utmp; chmod 644 utmp; }) # *************** *** 149,157 **** (cd /tmp && rm -rf [a-km-pr-zA-Z]* && find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;) - # Also remove X lock files since it will prevent you from - # restarting X11 after a system crash. - rm -f /tmp/.X*-lock /tmp/.X11-unix/* fi # snapshot any kernel -c changes back to disk --- 152,157 ---- >Release-Note: >Audit-Trail: From: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) To: rivers@dignus.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: conf/7366: /tmp/.X* not removed by /etc/rc if clear_tmp_enable != YES Date: 23 Jul 1998 09:58:44 +0200 Thomas David Rivers writes: > if clear_tmp_enable is YES, then /etc/rc kindly removes > /tmp/.X*-lock and /tmp/.X11-unix/* > > But - if clea_tmp_enable isn't yes; then these don't get > removed; causing X11 startup to fail on reboot. These files shouldn't be present if X was shut down properly (CTRL-R in xdm, ALT-CTRL-BACKSPACE, kill -TERM, you name it). If X did not shut down properly (kernel panic, power outage, kill -KILL, X server bug), the machine probably needs human intervention anyway. DES -- Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com From: Thomas David Rivers To: rivers@dignus.com, smoergrd@oslo.geco-prakla.slb.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: conf/7366: /tmp/.X* not removed by /etc/rc if clear_tmp_enable != YES Date: Thu, 23 Jul 1998 12:07:11 -0400 (EDT) > > Thomas David Rivers writes: > > if clear_tmp_enable is YES, then /etc/rc kindly removes > > /tmp/.X*-lock and /tmp/.X11-unix/* > > > > But - if clea_tmp_enable isn't yes; then these don't get > > removed; causing X11 startup to fail on reboot. > > These files shouldn't be present if X was shut down properly (CTRL-R > in xdm, ALT-CTRL-BACKSPACE, kill -TERM, you name it). If X did not > shut down properly (kernel panic, power outage, kill -KILL, X server > bug), the machine probably needs human intervention anyway. > > DES > -- > Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com > Well - isn't that simply drawing "the line" at X. For example, we go ahead and do fsck after a power outage, should we not do that? Exactly what things should we do and what things should we not do? Personally, I'd like X to come back if it can... I'll also add that if human intervention is needed, the machine drops to single-user state... so the human intervention will be there... In a situation where FreeBSD is used for many machines; I'd hate to have to visit hundreds of machines just because of a power outage (or, worse yet, instruct users to "become root and remove those files, then reboot...") - Dave Rivers - State-Changed-From-To: open->closed State-Changed-By: cracauer State-Changed-When: Mon Sep 7 19:18:56 MEST 1998 State-Changed-Why: A patch like you suggest has been applied to 3.0-current and will be in -stable if noone objects for some time. Thanks! >Unformatted: