[PATCH] Bugs in cron-config: filename case and PATH

Igor Pechtchanski pechtcha@cs.nyu.edu
Mon Oct 10 14:29:00 GMT 2005


/usr/bin/cron-config doesn't work when "case_check:strict" is in effect,
as well as not setting the PATH to include /usr/bin.  So, the cron service
can't find cygwin1.dll, unless $PATH in the global system environment
contains 'c:\cygwin\bin'.

There are two ways to fix the first problem (which prevents cron-config
from accessing the registry via /proc/registry): one is to force
relaxed/adjusted case checking in the script (as is done in the attached
patch), and the other is to use the proper case for registry access (not
sure how much it's standardized, though).

As said above, a patch that fixes both issues (for me) is attached.
ChangeLog is below.
	Igor
==============================================================================
2005-10-10  Igor Pechtchanski  <pechtcha@cs.nyu.edu>

	* cron-config: Add check_case:adjust to $CYGWIN.
	(install_service): Add /usr/bin to $PATH when installing as
	service.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA
-------------- next part --------------
--- cron-config-orig	2005-01-31 05:38:49.001000000 -0500
+++ cron-config	2005-10-10 10:02:10.084627600 -0400
@@ -7,6 +7,12 @@
 # ======================================================================
 
 # ======================================================================
+# Make sure case of filenames doesn't matter
+# ======================================================================
+
+CYGWIN="$CYGWIN check_case:adjust"
+
+# ======================================================================
 # Routine: getvalue
 # Get a verified non-empty string in variable "value"
 # ======================================================================
@@ -692,6 +698,7 @@ install_service() {
 		fi
 
 		if cygrunsrv -I cron -p /usr/sbin/cron -e CYGWIN="${ntsec}" \
+		    -e PATH="/usr/bin:$PATH" \
 		    -a "-D" -d "Cron daemon" -u "$username" -w "$_password"
 		    then
 		    service="service"
@@ -700,6 +707,7 @@ install_service() {
 		fi
 	    else
 		if cygrunsrv -I cron -p /usr/sbin/cron -e CYGWIN="${ntsec}" \
+		    -e PATH="/usr/bin:$PATH" \
 		    -a "-D" -d "Cron daemon"
 		    then
 		    service="service"
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list