From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31400 invoked by alias); 15 Sep 2002 09:21:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 31393 invoked from network); 15 Sep 2002 09:21:23 -0000 Received: from unknown (HELO ns.suxdotorg.co.uk) (80.192.161.67) by sources.redhat.com with SMTP; 15 Sep 2002 09:21:23 -0000 Received: from pajhome.org.uk ([192.168.0.250]) by ns.suxdotorg.co.uk (8.12.1/8.12.1) with ESMTP id g8F9M7tX020601 for ; Sun, 15 Sep 2002 10:22:07 +0100 Message-ID: <3D8452A8.FA2C2251@pajhome.org.uk> Date: Sun, 15 Sep 2002 02:47:00 -0000 From: Paul Johnston X-Accept-Language: en MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Installing cygwin-mketc.sh References: Content-Type: multipart/mixed; boundary="------------22CC9131E9CD87A9D8C9C956" X-SW-Source: 2002-09/txt/msg00743.txt.bz2 --------------22CC9131E9CD87A9D8C9C956 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 656 Hi, How does cygwin install decide where to put files? I was expecting some kind of map file mapping object files to installed files, but I couldn't find one. I can see we want cygwin-mketc.sh to end up in configure's $sysconfdir but beyond that I'm just getting lost > I've attached the message correction. If this is really part of cygwin, > please take it out altogether, along with the translation of $WINETC. Ok, I've taken out the message, but NOT the case translation of $WINETC. The case translation must be done before the directory existence check, or the check might fail. I think this has got to be the final version of the code now. Paul --------------22CC9131E9CD87A9D8C9C956 Content-Type: application/x-sh; name="cygwin-mketc.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygwin-mketc.sh" Content-length: 831 #!/bin/sh #-- # Create symbolic links from some /etc files to the Windows equivalents #-- FILES="hosts protocols services networks" OSNAME="`/bin/uname -s`" WINHOME="`/bin/cygpath -W`" case "$OSNAME" in CYGWIN_NT*) WINETC="$WINHOME/system32/drivers/etc" ;; CYGWIN_9*|CYGWIN_ME*) WINETC="$WINHOME" ;; *) echo "Unknown system type $OSNAME; exiting" >&2 exit 0 ;; esac WINETC="$(/bin/cygpath -u "$(/bin/cygpath -w -l "$WINETC")")" if [ ! -d "$WINETC" ] then echo "Directory $WINETC does not exist; exiting" >&2 exit 0 fi for FILE in $FILES do if [ ! -e "/etc/$FILE" -a ! -L "/etc/$FILE" ] then # Windows only uses the first 8 characters WFILE="$WINETC/`expr substr "$FILE" 1 8`" WFILE="$(/bin/cygpath -u "$(/bin/cygpath -w -l "$WFILE")")" /bin/ln -s -v "$WFILE" "/etc/$FILE" fi done --------------22CC9131E9CD87A9D8C9C956 Content-Type: text/plain; charset=us-ascii Content-length: 214 -- 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/ --------------22CC9131E9CD87A9D8C9C956--