Re: patch to cron
Hi Andy, On Nov 20 16:24, Andy Stevens wrote: > Hello Cygwin patchers, this is my first submission, hope I do OK. The patch looks ok to me, this is just the wrong mailing list :} cygwin-patches is for patches to the cygwin base package, not for patches to arbitrary packages in the Cygwin distro. Ideally you resend your message to the cygwin AT cygwin DOT com mailing list. I Bcc'ed the cron package maintainer so he can pick this up, though. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgp7UfXuMudxd.pgp Description: PGP signature
patch to cron
Hello Cygwin patchers, this is my first submission, hope I do OK. I have discovered a bug in Vixie's cron in the bash script /usr/bin/cron-config. The bug only appears on Windows 10 which has an NT version of "10.0". This breaks the version checking in the bash script. (Bash only supports integer compare or ASCII compare, but not float compare.) Below is my proposed patch. Thanks to http://stackoverflow.com/questions/8654051 for this bash magic. --- /usr/bin/cron-config2015-01-21 23:34:21.0 -0500 +++ cron-config 2015-11-20 16:08:24.574218000 -0500 @@ -126,7 +126,10 @@ nt2003="" nt=$(uname -s | sed -ne 's/^CYGWIN_NT-\([^ ]*\)/\1/p') [ -z "$nt" ] && echo "Unknown system name" && return 1 -[ "$nt" \> 5.1 ] && nt2003=yes +minver=5.1 +if [ ${nt%.*} -eq ${minver%.*} ] && [ ${nt#*.} \> ${minver#*.} ] || [ ${nt%.*} -gt ${minver%.*} ]; then + nt2003=yes +fi return 0 } # === End of get_NT() === # Best, --Andy Stevens Electrical Science, Inc. 114 Pearl St., Suite 2B Port Chester, NY 10573 USA Office: +1-914-939-7396 Mobile: +1-646-552-0732 Email: stev...@electricalscience.com Web: www.electricalscience.com