From owner-cvs-all@FreeBSD.ORG Wed May 16 08:18:45 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7E7516A401; Wed, 16 May 2007 08:18:45 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 83A3A13C483; Wed, 16 May 2007 08:18:45 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id C7FA120A6; Wed, 16 May 2007 10:18:41 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 44C052088; Wed, 16 May 2007 10:18:41 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 02E975248; Wed, 16 May 2007 10:18:40 +0200 (CEST) From: des@des.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) To: Alexander Leidinger References: <200705131815.l4DIFop9026874@repoman.freebsd.org> <20070514154040.0lofzrgm8kskgog4@webmail.leidinger.net> <86wszbqxbz.fsf@dwp.des.no> <20070514172938.5v4yi78kisokk84s@webmail.leidinger.net> <861whiy5ra.fsf@dwp.des.no> <20070516094330.dkp2e41vdc0w8kg8@webmail.leidinger.net> Date: Wed, 16 May 2007 10:18:40 +0200 In-Reply-To: <20070516094330.dkp2e41vdc0w8kg8@webmail.leidinger.net> (Alexander Leidinger's message of "Wed\, 16 May 2007 09\:43\:30 +0200") Message-ID: <86mz052nbz.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 08:18:45 -0000 Alexander Leidinger writes: > What about another idea: removing the chflags all together and let the > removal fail (with a message that the file may be protected with schg > and it should be removed with chglags). This way only a message > appears when the rm fails (saying no to the removal question of rm is > not a failure/exit!=3D0). OK with me. BTW, testing for the schg flag is not straightforward, but doable: flags=3D$(stat -f '%f' ./$${file}) if [ $((flags & 131072)) -eq 131072 ] ; then # schg is set fi Another possibility is if (ls -lo ./$${file} | grep -qw schg) ; then # schg is set fi but it's not 100% foolproof, as the file name itself or the owner / group might conceivably contain the word "schg". DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no