Mail Archives: cygwin/2002/09/10/15:49:56
---559023410-1143741253-1031687375=:1269
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 10 Sep 2002, Paul Johnston wrote:
> (back in main cygwin list as Robert pointed out this is not a setup
> change)
>
> Hi,
>
> I've created an NT-only postinstall script that should be suitible. I
> suggest it's called /etc/postinstall/make-etc-links.sh I don't have
> access to a Win 9x machine right now - if someone else could do this
> bit, that would be great; alternatively I will be able to do it in the
> next week or so.
>
> Paul
>
>
> #!/bin/sh
> #--
> # Creates symbolic links from some /etc files to their windows
> equivalents
> #--
> VERBOSE=-v
>
> if [ "$OS" = "Windows_NT" ]
> then
> WINETC=`/bin/cygpath $SYSTEMROOT`/system32/drivers/etc
> FILES="hosts protocol services"
> fi
>
> for FILE in $FILES
> do
> if [ ! -e /etc/$FILE ]
> then
> /bin/ln -s $VERBOSE ${WINETC}/$FILE /etc/$FILE
> fi
> done
>
> > NT has an equivalent to /etc/hosts, so I think the cygwin install should
> > create this symbolic link:
> >
> > /etc/hosts -> ${SYSTEMROOT}/system32/drivers/etc/hosts
9x systems also have these files, they should reside in ${WINBOOTDIR}.
You also omitted a file called 'networks'.
Attached are a new version of your script, as well as a diff with your
original version.
Note also that the links should probably use proper case for the path and
filenames, in case someone has CYGWIN=*check_case:strict*. I'm not sure
how to do this properly (use [cmd /c "dir /b "`cygpath -w $file`], maybe?)
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-1143741253-1031687375=:1269
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make-etc-links.sh-diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT GSO DOT 4 DOT 44 DOT 0209101549350 DOT 1269 AT slinky DOT cs DOT nyu DOT edu>
Content-Description:
Content-Disposition: attachment; filename="make-etc-links.sh-diff"
LS0tIG1ha2UtZXRjLWxpbmtzLnNoLW9yaWcJMjAwMi0wOS0xMCAxNTozOTo0
Mi4wMDAwMDAwMDAgLTA0MDANCisrKyBtYWtlLWV0Yy1saW5rcy5zaAkyMDAy
LTA5LTEwIDE1OjM5OjM3LjAwMDAwMDAwMCAtMDQwMA0KQEAgLTQsMTEgKzQs
MTQgQEANCiAjLS0NCiBWRVJCT1NFPS12DQogDQotaWYgWyAiJE9TIiA9ICJX
aW5kb3dzX05UIiBdDQotdGhlbg0KLSAgV0lORVRDPWAvYmluL2N5Z3BhdGgg
JFNZU1RFTVJPT1RgL3N5c3RlbTMyL2RyaXZlcnMvZXRjDQotICBGSUxFUz0i
aG9zdHMgcHJvdG9jb2wgc2VydmljZXMiDQotZmkNCitPU05BTUU9YC9iaW4v
dW5hbWUgLXNgDQorDQorY2FzZSAiJE9TTkFNRSIgaW4NCisgICBDWUdXSU5f
TlQqKSBXSU5FVEM9YC9iaW4vY3lncGF0aCAkU1lTVEVNUk9PVGAvc3lzdGVt
MzIvZHJpdmVycy9ldGMgOzsNCisgICBDWUdXSU5fOSopIFdJTkVUQz1gL2Jp
bi9jeWdwYXRoICRXSU5CT09URElSYCA7Ow0KKyAgICopIGVjaG8gIlVua25v
d24gc3lzdGVtIHR5cGUgJE9TTkFNRTsgZXhpdGluZyIgPiYyOyBleGl0IDEg
OzsNCitlc2FjDQorRklMRVM9Imhvc3RzIHByb3RvY29sIHNlcnZpY2VzIG5l
dHdvcmtzIg0KIA0KIGZvciBGSUxFIGluICRGSUxFUw0KIGRvDQo=
---559023410-1143741253-1031687375=:1269
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make-etc-links.sh"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT GSO DOT 4 DOT 44 DOT 0209101549351 DOT 1269 AT slinky DOT cs DOT nyu DOT edu>
Content-Description:
Content-Disposition: attachment; filename="make-etc-links.sh"
IyEvYmluL3NoDQojLS0NCiMgQ3JlYXRlcyBzeW1ib2xpYyBsaW5rcyBmcm9t
IHNvbWUgL2V0YyBmaWxlcyB0byB0aGVpciB3aW5kb3dzIGVxdWl2YWxlbnRz
DQojLS0NClZFUkJPU0U9LXYNCg0KT1NOQU1FPWAvYmluL3VuYW1lIC1zYA0K
DQpjYXNlICIkT1NOQU1FIiBpbg0KICAgQ1lHV0lOX05UKikgV0lORVRDPWAv
YmluL2N5Z3BhdGggJFNZU1RFTVJPT1RgL3N5c3RlbTMyL2RyaXZlcnMvZXRj
IDs7DQogICBDWUdXSU5fOSopIFdJTkVUQz1gL2Jpbi9jeWdwYXRoICRXSU5C
T09URElSYCA7Ow0KICAgKikgZWNobyAiVW5rbm93biBzeXN0ZW0gdHlwZSAk
T1NOQU1FOyBleGl0aW5nIiA+JjI7IGV4aXQgMSA7Ow0KZXNhYw0KRklMRVM9
Imhvc3RzIHByb3RvY29sIHNlcnZpY2VzIG5ldHdvcmtzIg0KDQpmb3IgRklM
RSBpbiAkRklMRVMNCmRvDQogIGlmIFsgISAtZSAvZXRjLyRGSUxFIF0NCiAg
dGhlbg0KICAgIC9iaW4vbG4gLXMgJFZFUkJPU0UgJHtXSU5FVEN9LyRGSUxF
IC9ldGMvJEZJTEUNCiAgZmkNCmRvbmUNCg0K
---559023410-1143741253-1031687375=: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-1143741253-1031687375=:1269--
- Raw text -