From owner-freebsd-hackers Mon Jul 23 19:42:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hex.databits.net (hex.databits.net [207.29.192.16]) by hub.freebsd.org (Postfix) with SMTP id B086437B401 for ; Mon, 23 Jul 2001 19:42:20 -0700 (PDT) (envelope-from petef@hex.databits.net) Received: (qmail 4307 invoked by uid 1001); 24 Jul 2001 02:44:03 -0000 Date: Mon, 23 Jul 2001 22:44:03 -0400 From: Pete Fritchman To: Romain Kang Cc: hackers@FreeBSD.ORG Subject: Re: pkg_add puzzlement Message-ID: <20010723224403.A3906@databits.net> References: <200107240121.f6O1L0p17808@kzsu.stanford.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107240121.f6O1L0p17808@kzsu.stanford.edu>; from romain@kzsu.stanford.edu on Mon, Jul 23, 2001 at 06:21:00PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ++ 23/07/01 18:21 -0700 - Romain Kang: | I've been using this in a PLIST: | | 1 @exec test -d %D/var/run/procstates || mkdir -p %D/var/run/procstates | 2 @exec chown root.wheel %D/var/run/procstates && chmod 1775 %D/var/run/procstates [nitpick: you should use chown root:wheel] | | The rationale for each line: | - 1 Install: make sure that the directory exists, avoiding error messages | if an earlier instance of the package is on the machine. Just curious, but isn't this a bit redundant? mkdir -p will never return an error, so you don't have to worry if the directory already exists. | - 2 Install: make sure directory has correct permissions. | | For some reason, there are machines where the package is added, but | /var/run/procstates does not get created. pkg_add has no complaints. I did a real quick test, and noticed the same thing. But like I said above, just @exec mkdir -p should do the trick in this case. -pete -- Pete Fritchman Databits Network Services, Inc. finger petef@databits.net for PGP key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message