Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: "'cygwin'" Subject: RE: automatic cronjaob injectsion Date: Fri, 17 Sep 2004 19:04:02 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <414B1D41.7070400@x-ray.at> Message-ID: X-OriginalArrivalTime: 17 Sep 2004 18:04:02.0765 (UTC) FILETIME=[B6DB4FD0:01C49CE0] > -----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? cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/