Mail Archives: cygwin/2003/05/07/11:12:35
Bill,
This is *way* too complicated. It's fine if you run other things using
sysvinit, but if all you want is cron, try the way described in
/usr/doc/Cygwin/cron.README (you did read it, didn't you? that directory
contains the necessary instructions specifically for the Cygwin ports --
see <http://cygwin.com/faq/faq.html#SEC28>).
Regarding your "NOTE 1" below -- is it reproducible? Could you please
post the output of "getfacl filename" before and after "chown filename"?
Perhaps Pierre or Corinna could comment on this?
Igor
On Wed, 7 May 2003, Bill C. Riemers wrote:
> I'd love to hear the "correct" answer for this. This is the solution I've
> come up with, and but it is way too complicated...
>
> 1. Install the SYSV init package.
> 2. Configure the "init" package:
> /usr/bin/init-config
> 3. Replace the /etc/inittab with the one I've attached.
> 4. Save the attached init.sh script as /usr/sbin/init.sh .
> 5. Create the directory /var/lock/subsys:
> mkdir -p /var/lock/subsys
> 5. Uninstall the init service:
> cygrunsrv -R init
> 6. Install the init.sh script as the init service:
> cygrunsrv -I init -p /usr/sbin/init.sh -d "CYGWIN init" -s INT -o
> 7. Stop the new service:
> cygrunsrv --stop init
> 8. Clean the /var/log directory:
> rm /var/log/*
> (Some daemons refuse to start otherwise.)
> 9. Save the attached cron script as /etc/rc.d/init.d/cron
> 10. Create the following symbolic links:
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc0.d/K25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc1.d/K25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc2.d/S25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc3.d/S25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc4.d/S25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc4.d/S25cron
> ln -s /etc/rc.d/init.d/cron /etc/rc.d/rc6.d/S25cron
> 11. Restart the init service:
> cygrunsrv --start init
>
> NOTE 1:
>
> If you have problems, try removing files that are automatically created, and
> start the daemon again. Something that took me a long time to realize is
> "chown" does not work correctly under CYGWIN
> on Windows XP. It will change the "owner" that cygwin shows the file as
> owned by. However,
> it doesn't actually effect permissions. i.e.
> echo "hi" > foo.txt
> chmod 600 foo.txt
> chown SYSTEM foo.txt
> will create a file that appears to be owned by SYSTEM and only accessible by
> "SYSTEM". However, the "SYSTEM" user will get an EPERM error when trying to
> read or write the file...
> So even if a file appears to have the correct ownership under "ls" and
> "getfacl", it might not...
> I have not figured out a way to determine the "real" owner of a file.
>
> NOTE 2:
>
> My init.sh script steps back and forth through the run levels. This is
> mainly to simulate the behavior I'm used to. If everything is configured
> correctly, it should be sufficient just to switch to runlevel 6 when
> shutting down and to your default run level when starting up.
>
> Bill
>
> ----
> To: cygwin AT cygwin DOT com
> From: "Sanjay Goel" <sanjaygoel AT hotpop DOT com>
> Subject: cron in cygwin
> Date: Wed, 7 May 2003 13:13:37 +0530
> Message-ID: <b9ad70$hkh$1 AT main DOT gmane DOT org>
>
> I want to run updatedb every week ... I wrote the following in my crontab
>
> 0 22 * * 2 updatedb --localpaths="/ /c /d /e"
>
> but it never works.
>
> Can somebody tell me how to set cron jobs in cygwin.
>
> Thanks in advance
>
> Sanjay
>
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
-- Leto II
--
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/
- Raw text -