X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=aCXsZMRWGY6d8OTd j6/HPJzsCF1l84tDbiVe87Wus1/tMROueZ4uCxllahd4YTM8Z8h1b6B7EpnEWGVZ appWb2PnIZDlpr79wil3xkvVjxBRmWSf4803S/kBzdxIXOVIJITi7f+OROa9V+TQ vJFU9NycVrkAZU0pEsMaLrUZm0k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=PzMAi8F1mAd4ydBTgd5zwu qYYb0=; b=BiOz8WsT04eh86h1PCly8dz7kW+yJgjmrwde9rxfJIgVrildSsWpPU fVrK6XX0fo5+hktdm5FKRt0/Grqc3ejNgoqDF5LVFP5HaD/Mf5QOcJjoxbZcp6XK JyZ4mknwgnRo3bcCXF1qgyej/grKxTwv6JYaCsPyT4nQNz6ojj67M= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: [ANNOUNCEMENT] Updated/Test: base-files-4.3-1 To: cygwin AT cygwin DOT com References: <57CC0128 DOT 3080900 AT t-online DOT de> <87k2ersy04 DOT fsf AT Rainer DOT invalid> From: Christian Franke Message-ID: <57CC0FD6.9000006@t-online.de> Date: Sun, 4 Sep 2016 14:13:10 +0200 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 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