From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15202 invoked by alias); 2 Dec 2002 12:56:29 -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 15194 invoked from network); 2 Dec 2002 12:56:26 -0000 Received: from unknown (HELO mailhost1.experian.co.uk) (194.60.170.34) by sources.redhat.com with SMTP; 2 Dec 2002 12:56:26 -0000 Received: from exchukthgw01.experian.co.uk (unverified) by mailhost1.experian.co.uk (Content Technologies SMTPRS 4.1.5) with ESMTP id for ; Mon, 2 Dec 2002 12:50:00 +0000 Received: by exchukthgw01.experian.co.uk with Internet Mail Service (5.5.2653.19) id ; Mon, 2 Dec 2002 12:56:09 -0000 Message-ID: From: "Morrison, John" To: "'cygwin@cygwin.com'" Subject: defaults Date: Mon, 02 Dec 2002 04:56:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-12/txt/msg00027.txt.bz2 Hi all. This has been at the back of my mind for awhile now since having to do something for /etc/profile.default. What I'm thinking of is a directory structure containing default files and a script which, if the original of the default file doesn't exist, copies it. I'm specifically thinking of: /etc/apache.new/access.conf.default /etc/apache.new/httpd.conf.default /etc/apache.new/magic.default /etc/apache.new/mime.types.default /etc/apache.new/srm.conf.default /etc/bash.bashrc.default /etc/enscript.cfg.default /etc/exim.conf.default /etc/mime.conf.default /etc/profile.default /etc/skel/[initial user files here] /etc/squid.conf.default I think creating... /etc/defaults/etc/apache/access.conf /etc/defaults/etc/apache/httpd.conf /etc/defaults/etc/apache/magic /etc/defaults/etc/apache/mime.types /etc/defaults/etc/apache/srm.conf /etc/defaults/etc/bash.bashrc /etc/defaults/etc/enscript.cfg /etc/defaults/etc/exim.conf /etc/defaults/etc/mime.conf /etc/defaults/etc/profile /etc/defaults/etc/skel/[initial user files here] /etc/defaults/etc/squid.conf and the script... ================================================================ #!/bin/bash cd /etc/defaults for f in `find . -type f`; do fDest = `echo $f | sed 's/^\.//g'` echo $f $fDest if [ ! -f $fDest ]; then echo Using the default version of $fDest cp $f $fDest else echo $fDest is already in existance, not overwriting. fi done ================================================================ There are however, a few problems which need to be overcome. The first is that this script, although best as a postinstall, would have be executed _after every install_. The other would be to get people to use it ;) Well, that's my mental thoughts on paper(?!). Any comments? would it be worth doing? J. --LongSig It's so stupid of modern civilization to have given up believing in the Devil when he is the only explanation of it. ======================================================================= Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF -- 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/