From dom@myrddin.demon.co.uk  Sat May 16 03:13:34 1998
Received: from myrddin.demon.co.uk (exim@myrddin.demon.co.uk [158.152.54.180])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id DAA22087
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 16 May 1998 03:13:27 -0700 (PDT)
          (envelope-from dom@myrddin.demon.co.uk)
Received: from dom by myrddin.demon.co.uk with local (Exim 1.80 #1)
	id 0yaQh4-00004y-00; Fri, 15 May 1998 21:03:02 +0100
Message-Id: <E0yaQh4-00004y-00.qmail@myrddin.demon.co.uk>
Date: Fri, 15 May 1998 21:03:02 +0100
From: dom@myrddin.demon.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: change to /etc/rc
X-Send-Pr-Version: 3.2

>Number:         6653
>Category:       bin
>Synopsis:       The rc script sometimes produces errors which are unnecessary.
>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:   Sat May 16 03:10:01 PDT 1998
>Closed-Date:    Tue Jun 22 06:51:02 PDT 1999
>Last-Modified:  Tue Jun 22 06:52:43 PDT 1999
>Originator:     Dom Mitchell
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Big orange angry things, inc.
>Environment:

FreeBSD myrddin.demon.co.uk 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Sun Apr 26 18:11:38 BST 1998     dom@myrddin.demon.co.uk:/usr/src/sys/compile/MYRDDIN  i386

myrddin# ident /etc/rc
/etc/rc:
     $Id: rc,v 1.143 1998/01/08 17:08:22 joerg Exp $

>Description:

If there are directories in the /var/run directory (eg: as used by the
sudo and xemacs ports), then the line in /etc/rc that says:

rm -f /var/run/*

Produces an error on boot up time, which could confuse a new user.

>How-To-Repeat:

1. Install sudo.
2. Use sudo.
3. Reboot.

>Fix:

Change the above mentioned line to:

rm -f /var/run/* 2>/dev/null

You may also wish to add the following statement to a point after which
/usr is mounted:

find /var/run -type f -print | xargs rm -f
>Release-Note:
>Audit-Trail:

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: dom@myrddin.demon.co.uk
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/6653: change to /etc/rc
Date: Sat, 16 May 1998 16:13:41 +0200 (CEST)

 > >Description:
 > 
 > If there are directories in the /var/run directory (eg: as used by the
 > sudo and xemacs ports), then the line in /etc/rc that says:
 > 
 > rm -f /var/run/*
 > 
 > Produces an error on boot up time, which could confuse a new user.
 
 Same as in -STABLE. See also misc/4723. I was told that ports which
 create directories in /var/run are broken. However, nobody fixed
 the ports nor changed /etc/rc :-( (Yes, I sent a mail to the sudo
 port maintainer...)

From: Dom Mitchell <dom@myrddin.demon.co.uk>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/6653: change to /etc/rc 
Date: Sat, 16 May 1998 19:10:02 +0100

 On 16 May 1998, Andre Albsmeier proclaimed:
 > > >Description:
 > > 
 > > If there are directories in the /var/run directory (eg: as used by the
 > > sudo and xemacs ports), then the line in /etc/rc that says:
 > > 
 > > rm -f /var/run/*
 > > 
 > > Produces an error on boot up time, which could confuse a new user.
 > 
 > Same as in -STABLE. See also misc/4723. I was told that ports which
 > create directories in /var/run are broken. However, nobody fixed
 > the ports nor changed /etc/rc :-( (Yes, I sent a mail to the sudo
 > port maintainer...)
 
 To me, the idea of using a directory in /var/run doesn't seem an
 unreasonable thing to do.  If you don't, then people just end up using
 /var/tmp instead for things which don't /really/ belong there.
 
 Does anybody have a defeinitive statement of what /var/run should be
 used for?
 -- 
 allectory calyptro agal artophagous arthrocarcinoma candlerent
 bombastically aguavina anaesthesiant abortionist anagrammatize
 anthropogenetic adenia antiophthalmic brevicaudate Bothriolepis
 capitalizable arracach alestake calculating Amphisilidae Archencephala
State-Changed-From-To: open->feedback 
State-Changed-By: phk 
State-Changed-When: Sun May 17 22:53:09 PDT 1998 
State-Changed-Why:  
Yes, things that >SHALL< be blown away on boot. 
If the subdir sudo uses were removed as part of boot, would sudo 
make it again ?  If not, could you add a etc/rc.d script which creates 
it and then submit a patch which zaps /var/run completely ? 

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: Dom Mitchell <dom@myrddin.demon.co.uk>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/6653 
Date: Tue, 19 May 1998 08:49:13 +0200

 In message <E0ybK5c-00007n-00.qmail@myrddin.demon.co.uk>, Dom Mitchell writes:
 >Poul-Henning Kamp <phk@FreeBSD.ORG> writes:
 >
 >> Synopsis: The rc script sometimes produces errors which are unnecessary.
 >> 
 >> State-Changed-From-To: open->feedback
 >> State-Changed-By: phk
 >> State-Changed-When: Sun May 17 22:53:09 PDT 1998
 >> State-Changed-Why: 
 >>
 >> Yes, things that >SHALL< be blown away on boot.
 >> If the subdir sudo uses were removed as part of boot, would sudo
 >> make it again ?  If not, could you add a etc/rc.d script which creates
 >> it and then submit a patch which zaps /var/run completely ?
 >
 >I'm not saying it should blow away directories under /var/run.  It
 >should remove any files it finds though.  From what I've seen, this
 >has to be a two stage process, removing stuff in /var/run at start and 
 >removing stuff in subdirectories later, when /usr is mounted and find
 >is available.
 
 I just think that it would be much simpler to blow it all away in
 one operation, and expect things needed subdirs to make them again.
 
 If sudo is the only customer for subdirs at this time, I certainly
 think this is the way to do it.
 
 --
 Poul-Henning Kamp             FreeBSD coreteam member
 phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
 "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: "Daniel O'Callaghan" <danny@panda.hilink.com.au>
Cc: freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/6653 
Date: Tue, 19 May 1998 12:43:24 +0200

 In message <Pine.BSF.3.91.980519203032.411U@panda.hilink.com.au>, "Daniel O'Cal
 laghan" writes:
 >
 >>  I just think that it would be much simpler to blow it all away in
 >>  one operation, and expect things needed subdirs to make them again.
 >>  
 >>  If sudo is the only customer for subdirs at this time, I certainly
 >>  think this is the way to do it.
 >
 >sudo, *.pid (non-root) are candidates.
 >
 >What about
 >
 >cd /var/run
 >rm -f *
 >for dir in *
 >do
 >	rm -f $dir/*
 >done
 
 I'd rather:
 	cd /var
 	rm -rf run
 	mkdir run
 
 >Also, what is the purpose of /var/preserve, please?  Would that be a 
 >better place to locate ntp.drift, rather than /etc?
 
 /var/preserve is for vi I belive.  I put ntp.drift in /var/tmp
 
 --
 Poul-Henning Kamp             FreeBSD coreteam member
 phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
 "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal

From: Eivind Eklund <eivind@yes.no>
To: Poul-Henning Kamp <phk@critter.freebsd.dk>,
        "Daniel O'Callaghan" <danny@panda.hilink.com.au>
Cc: freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/6653
Date: Tue, 19 May 1998 15:04:21 +0200

 On Tue, May 19, 1998 at 12:43:24PM +0200, Poul-Henning Kamp wrote:
 > >Also, what is the purpose of /var/preserve, please?  Would that be a 
 > >better place to locate ntp.drift, rather than /etc?
 > 
 > /var/preserve is for vi I belive.
 
 From hier(7):
      /var/    multi-purpose log, temporary, transient, and spool files
               preserve/  temporary home of files preserved after an accidental
                          death of an editor; see ex(1)
 
 
 >  I put ntp.drift in /var/tmp
 
 My preference would be for db:
               db/        misc. automatically generated system-specific
                          database files
 though /var/tmp is probably OK, too (it is supposed to be kept between
 reboots).
 
 Eivind.

From: Dom Mitchell <dom@myrddin.demon.co.uk>
To: Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/6653 
Date: Tue, 19 May 1998 18:29:41 +0100

 On 19 May 1998, Poul-Henning Kamp proclaimed:
 > In message <E0ybK5c-00007n-00.qmail@myrddin.demon.co.uk>, Dom Mitchell writes
 > >I'm not saying it should blow away directories under /var/run.  It
 > >should remove any files it finds though.  From what I've seen, this
 > >has to be a two stage process, removing stuff in /var/run at start and 
 > >removing stuff in subdirectories later, when /usr is mounted and find
 > >is available.
 > 
 > I just think that it would be much simpler to blow it all away in
 > one operation, and expect things needed subdirs to make them again.
 
 I agree.  That would be much cleaner.
 
 > If sudo is the only customer for subdirs at this time, I certainly
 > think this is the way to do it.
 
 Well, so far, the ones that I have come across are sudo and xemacs.
 Sudo needs it to track when a user/tty pair last executed a command.
 I think that xemacs is using it for lockfiles.  Is there a better place
 for both of these to go?  If so, I suggest that we fix the ports, and
 keep /etc/rc as is.
 
 Maybe we need a /var/ports directory, for ports to keep their own
 information under...
 -- 
 butoxy alabamine aliquot aquocarbonic catarrhal bromacetate
 azoxybenzoic bimaxillary cathedralic Amaryllis abjectedness
 angiosclerosis blanketflower anhydric amputate brooklike baikalite
 autoanalysis Angelica Barsac anthropopathic bulltoad bisetose
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Tue Jun 22 06:51:02 PDT 1999 
State-Changed-Why:  
phk in revision 1.145 of src/etc/rc . 
>Unformatted:
