delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/11/10:31:25

X-Spam-Check-By: sourceware.org
Date: Wed, 11 Apr 2007 10:30:07 -0400
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
Subject: Re: [ANNOUNCEMENT] Updated: cron 4.1-1
To: <cygwin AT cygwin DOT com>
Message-id: <011601c77c45$e87c8210$3c0110ac@wirelessworld.airvananet.com>
MIME-version: 1.0
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
References: <announce DOT 3 DOT 0 DOT 1 DOT 32 DOT 20070411064934 DOT 00ba6708 AT incoming DOT verizon DOT net> <461CEAAC DOT 7040608 AT mscha DOT nl> <010a01c77c43$e1ea24e0$3c0110ac AT wirelessworld DOT airvananet DOT com> <461CEEE0 DOT 7040202 AT mscha DOT nl>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

----- Original Message ----- 
From: "Michael Schaap"
To: <cygwin AT cygwin DOT com>
Sent: Wednesday, April 11, 2007 10:21 AM
Subject: Re: [ANNOUNCEMENT] Updated: cron 4.1-1


| On 11-Apr-2007 16:15, Pierre A. Humblet wrote:
| > ----- Original Message ----- 
| > From: "Michael Schaap"
| > To: <cygwin>
| > Sent: Wednesday, April 11, 2007 10:03 AM
| > Subject: Re: [ANNOUNCEMENT] Updated: cron 4.1-1
| >
| >
| > | On 11-Apr-2007 12:49, Pierre A. Humblet wrote:
| > | > If /usr/sbin/sendmail does not point to a mailer, the cron postinstall script
| > | > links it to the (new) script /usr/bin/cronlog.
| > | >
| > |
| > | Isn't this a bit aggressive? Cron isn't the only one who might be using
| > | sendmail, you know...
| > | Might it not be better if crond would be made smart enough to run
| > | /usr/bin/cronlog in case /usr/sbin/sendmail doesn't exist?
| > |
| > | Aside from that, the cron postinstall just removed my existing sendmail
| > | symlink (to ssmtp), leaving me without one.
| > | Your code does:
| > |
| > | # Link sendmail to a poor man's mailer if sendmail
| > | # does not exist (e.g. dangling symlink)
| > | # Handle the .exe mess
| > | [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe ] ||
| > | ln -sf /usr/bin/cronlog /usr/sbin/sendmail
| > | [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe
| > |
| > | which is broken in the case of an existing symlink
| > | /usr/sbin/sendmail.exe -> /usr/sbin/ssmtp.exe (as created by current
| > | versions of ssmtp-config and ln).
| > |
| > | – Michael
| >
| > Sorry, I thought I had tested that and I don't see why it happened.
| > Exactly what did you observe?
| > If you had either /usr/sbin/sendmail  or /usr/sbin/sendmail.exe pointing
| > to an existing file, then "ln -sf /usr/bin/cronlog " should not have run.
| > If you had both /usr/sbin/sendmail  already pointing to a file and /usr/sbin/senmail.exe
| > existed (not necessarily pointing to anything) , which guarantees confusion,
| > then the second one was removed. That's a little aggressive, I should make
| > it conditional on cronlog being newly linked.
| >
| "[ -e /usr/sbin/sendmail ]" is true when a symlink
| "/usr/sbin/sendmail.exe" exists.

Precisely if "[ -e /usr/sbin/sendmail ]"  is true then
 || ln -sf /usr/bin/cronlog /usr/sbin/sendmail
shouldn't run.
I just tested that again on my system..

| If you have to do this by symlinking sendmail (which I still don't like,
| but that's just me), can't you move the creation to cron-config, so you
| can ask the user for permission before you do it?

Yes, but there are always those that do it by hand and then complain.
I absolutely want to avoid disturbing existing installations, so understanding
exactly what happened would help.

 Pierre 


--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019