This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: automatic cronjaob injectsion

> -----Original Message-----
> From: cygwin-owner On Behalf Of Reini Urban
> Sent: 17 September 2004 18:22

> I know that it might be possible and I know that is not advisable,

  So why are you asking?  You know the ropes: what does it say at the top of
EVERY single file in /var/cron/tabs?

# DO NOT EDIT THIS FILE - edit the master and reinstall.

  If it's inadvisable, then it seems wildly reckless to attempt a flaky and
improper technique in a postinstall script, because such scripts are going
to be run by every conceivable kind of user in every conceivable combination
of environments and if something can go wrong, it will.  A postinstall
script should be utterly solid (well, as close to as possible) because it's
such a critical part of the cygwin distribution mechanism.  A broken
postinstall script that causes setup.exe to bomb out (rare, but I've seen it
happen) can get users stuck in an endless cycle of download megs of files -
get half-way through installing - setup crashes - restart setup and it
doesn't remember what it's done and needs to re-download everything again.

  So don't do it.  If you want to do this programatically, use "crontab -l"
to dump it to a file, use a sed script to edit it - I don't think blindly
appending a line without making sure you delete the old one would be good -
then "crontab edited-file" to update it.

  That doesn't seem to me any more hard than the three operations you have
in your way of doing it, and it's guaranteed to work.  What motivation for
doing it any other way could there be?

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]