From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100566 invoked by alias); 4 Sep 2016 12:13:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 100553 invoked by uid 89); 4 Sep 2016 12:13:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*i:sk:87k2ers, H*f:sk:87k2ers, H*MI:sk:87k2ers, H*c:ISO-8859-1 X-HELO: mailout03.t-online.de Received: from mailout03.t-online.de (HELO mailout03.t-online.de) (194.25.134.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Sep 2016 12:13:20 +0000 Received: from fwd31.aul.t-online.de (fwd31.aul.t-online.de [172.20.26.136]) by mailout03.t-online.de (Postfix) with SMTP id B2E20422BD09 for ; Sun, 4 Sep 2016 14:13:17 +0200 (CEST) Received: from [192.168.2.101] (V+RWf6ZG8hyzzkHNvQvTyLKA+8c+5dQvrX4O172bGFC1+1c6GjYdoKQtbyNkfZewtm@[84.180.91.55]) by fwd31.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1bgWIS-3rJDtY0; Sun, 4 Sep 2016 14:13:12 +0200 Subject: Re: [ANNOUNCEMENT] Updated/Test: base-files-4.3-1 To: cygwin@cygwin.com References: <57CC0128.3080900@t-online.de> <87k2ersy04.fsf@Rainer.invalid> From: Christian Franke Message-ID: <57CC0FD6.9000006@t-online.de> Date: Sun, 04 Sep 2016 12:13:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: <87k2ersy04.fsf@Rainer.invalid> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00062.txt.bz2 Achim Gratz wrote: > Christian Franke writes: >> --- base-files-profile.sh.orig 2016-09-03 13:37:59.000000000 +0200 >> +++ base-files-profile.sh 2016-09-04 12:42:40.805222900 +0200 >> @@ -18,7 +18,7 @@ >> if [ ! -e ${fDest} -a ! -L ${fDest} ]; then >> echo "Using the default version of ${fDest} (${fSrc})" >> /usr/bin/mkdir -p $(dirname ${fDest}) >> - /usr/bin/touch ${fDest} >> + test "${fDest}" = "/Cygwin.bat" || /usr/bin/touch ${fDest} >> /usr/bin/cp ${fSrc} ${fDest} >> else >> echo "${fDest} is already in existence, not overwriting." > I have no idea why it's touching the file first, but I'd rather use > > cp --preserve=mode > > and fix the mode bits in /etc/defaults if necessary. I guess the touch command is from the early days to ensure that all files get same default permissions regardless of source file permissions. Removing the touch command would be sufficient. A 'cp' without options uses the permission mask from source file when a new file is created (POSIX requirement). Cygport's make_etc_defaults also generates plain /usr/bin/cp commands. "cp --preserve" would also copy owner and timestamps. Regards, Christian -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple