[ANNOUNCEMENT] Updated/Test: base-files-4.3-1

Christian Franke Christian.Franke@t-online.de
Sun Sep 4 12:13:00 GMT 2016

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.


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

More information about the Cygwin mailing list