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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 11 Sep 2002 18:27:25 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com cc: Paul Johnston , Warren Young Subject: Re: Beginnings of a patch: /etc/hosts In-Reply-To: <3D7FBAEE.7050401@etr-usa.com> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1382141583-1031783245=:1269" ---559023410-1382141583-1031783245=:1269 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, Script attached; comments below. On Wed, 11 Sep 2002, Paul Johnston wrote: > Hi, > Brilliant to see so much progress on this! > Are you sure that "CYGWIN_9*)" correctly catches Windows ME? No, I'm not. I'm incorporating Warren Young's suggestion. Unless someone with ME can confirm that 'uname -s' returns CYGWIN_9*? Nicholas? > I think we're safe with the case issue, given that cygpath -W seems to > return the correct case. Yes, but we are assuming that the file names are all lowercase. > However, I think adding this belt-and-braces check might be a good idea: > > if [ ! -d "$WINETC" ] > then > echo "ERROR: Directory $WINETC not found" >&2 > exit 2 > fi Done, but without the error code. Should we still print a message, though? > Apart from that, seems just about ready to go. Not sure if the change > history is necessary though, at least not until it's first checked-in. > > Paul The change history was for me to keep track of what I've done. It should probably be deleted when this is submitted as an official patch... This is my alternative to setting up a cvs repository for one file (probably should have, though, same effort, and fewer complaints :-) ). On Wed, 11 Sep 2002, Warren Young wrote: > Paul Johnston wrote: > > > > Are you sure that "CYGWIN_9*)" correctly catches Windows ME? > > You might take a look at my alternate patch in the patches list. It > doesn't rely on that sort of thing -- it relies instead on well-known > environment variables: $SYSTEMROOT and $WINDIR. It still has some > OS-specific knowledge in it, in that it knows that only NT-derived OSes > define SYSTEMROOT and uses WINDIR as a fallback for 9x systems. I don't > know which approach is superior. I've incorporated yours for now. If people confirm that `uname -s` returns either CYGWIN_NT* or CYGWIN_9* on all relevant systems, we could revert to that mechanism. > > However, I think adding this belt-and-braces check might be a good idea: > > I'm not a fan of the "if X, scream and die" bit in this original script > or the one you've proposed. Postinstall scripts shouldn't fail. I > think they should give best effort, and if they can't do what you want, > they should simply quietly skip that bit. Besides, this patch may be > put into some other postinstall script, and you don't want to avoid > doing the other tasks in that script just because the /etc/hosts part > can't find the Windows system directory. Well, we should at least refrain from making the symlinks then... On another note, I'm not sure why you were checking for the presence of the windows files. We could still create dangling symlinks if they are missing, which will allow the files to be created by editing/saving the symlink. Igor -- 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! It took the computational power of three Commodore 64s to fly to the moon. It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file ---559023410-1382141583-1031783245=:1269 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make-etc-links.sh" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="make-etc-links.sh" IyEvYmluL3NoDQojLS0NCiMgQ3JlYXRlcyBzeW1ib2xpYyBsaW5rcyBmcm9t IHNvbWUgL2V0YyBmaWxlcyB0byB0aGVpciB3aW5kb3dzIGVxdWl2YWxlbnRz DQojDQojIFZlcnNpb246IDAuNA0KIw0KIyBDaGFuZ2VMb2c6DQojICAgIHYw LjQgSWdvciBQZWNodGNoYW5za2kgPHBlY2h0Y2hhIGF0IGNzLm55dS5lZHU+ Og0KIyAgICAgICBVc2UgJFNZU1RFTVJPT1QgYW5kICRXSU5ESVIgdG8gZGV0 ZXJtaW5lIHRoZSBPUyAodGh4IFdhcnJlbiB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gMA0KZmkNCkZJTEVTPSJob3N0 cyBwcm90b2NvbHMgc2VydmljZXMgbmV0d29ya3MiDQoNCmlmIFsgISAtZCAi JFdJTkVUQyIgXQ0KdGhlbg0KICBleGl0IDANCmZpDQoNCmZvciBGSUxFIGlu ICRGSUxFUw0KZG8NCiAgaWYgWyAhIC1lICIvZXRjLyRGSUxFIiBdDQogIHRo ZW4NCiAgICAjIFdpbmRvd3Mgb25seSB1c2VzIHRoZSBmaXJzdCA4IGNoYXJh Y3RlcnMNCiAgICBXRklMRT1gZXhwciBzdWJzdHIgIiRGSUxFIiAxIDhgDQog ICAgL2Jpbi9sbiAtcyAkVkVSQk9TRSAiJFdJTkVUQy8kV0ZJTEUiICIvZXRj LyRGSUxFIg0KICBmaQ0KZG9uZQ0KDQo= ---559023410-1382141583-1031783245=:1269 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make-etc-links.sh-0.4-diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="make-etc-links.sh-0.4-diff" LS0tIG1ha2UtZXRjLWxpbmtzLnNoLW9yaWcJMjAwMi0wOS0xMSAxNDowNzoz MS4wMDAwMDAwMDAgLTA0MDANCisrKyBtYWtlLWV0Yy1saW5rcy5zaAkyMDAy LTA5LTExIDE4OjA4OjM5LjAwMDAwMDAwMCAtMDQwMA0KQEAgLTIsMTIgKzIs MTYgQEANCiAjLS0NCiAjIENyZWF0ZXMgc3ltYm9saWMgbGlua3MgZnJvbSBz b21lIC9ldGMgZmlsZXMgdG8gdGhlaXIgd2luZG93cyBlcXVpdmFsZW50cw0K ICMNCi0jIFZlcnNpb246IDAuMw0KKyMgVmVyc2lvbjogMC40DQogIw0KICMg Q2hhbmdlTG9nOg0KKyMgICAgdjAuNCBJZ29yIFBlY2h0Y2hhbnNraSA8cGVj aHRjaGEgYXQgY3Mubnl1LmVkdT46DQorIyAgICAgICBVc2UgJFNZU1RFTVJP T1QgYW5kICRXSU5ESVIgdG8gZGV0ZXJt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IHR5cGUgJE9TTkFNRTsgZXhp dGluZyIgPiYyOyBleGl0IDEgOzsNCi1lc2FjDQoraWYgWyAtbiAiJFNZU1RF TVJPT1QiIF0NCit0aGVuDQorICBXSU5FVEM9IiRXSU5IT01FL3N5c3RlbTMy L2RyaXZlcnMvZXRjIg0KK2VsaWYgWyAtbiAiJFdJTkRJUiIgXQ0KK3RoZW4N CisgIFdJTkVUQz0iJFdJTkhPTUUiDQorZWxzZQ0KKyAgZXhpdCAwDQorZmkN CiBGSUxFUz0iaG9zdHMgcHJvdG9jb2xzIHNlcnZpY2VzIG5ldHdvcmtzIg0K IA0KK2lmIFsgISAtZCAiJFdJTkVUQyIgXQ0KK3RoZW4NCisgIGV4aXQgMA0K K2ZpDQorDQogZm9yIEZJTEUgaW4gJEZJTEVTDQogZG8NCiAgIGlmIFsgISAt ZSAiL2V0Yy8kRklMRSIgXQ0KICAgdGhlbg0KICAgICAjIFdpbmRvd3Mgb25s eSB1c2VzIHRoZSBmaXJzdCA4IGNoYXJhY3RlcnMNCi0gICAgV0ZJTEU9YGVj aG8gJEZJTEUgfCBzZWQgJ3MvXlwoLlx7MCw4XH1cKS4qL1wxLydgDQorICAg IFdGSUxFPWBleHByIHN1YnN0ciAiJEZJTEUiIDEgOGANCiAgICAgL2Jpbi9s biAtcyAkVkVSQk9TRSAiJFdJTkVUQy8kV0ZJTEUiICIvZXRjLyRGSUxFIg0K ICAgZmkNCiBkb25lDQo= ---559023410-1382141583-1031783245=:1269 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ---559023410-1382141583-1031783245=:1269--