From owner-freebsd-questions@FreeBSD.ORG Tue Apr 11 05:30:41 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B82416A400 for ; Tue, 11 Apr 2006 05:30:41 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC2BD43D45 for ; Tue, 11 Apr 2006 05:30:40 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.6+UW06.03/8.13.5+UW06.03) with ESMTP id k3B5UeZt026927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Apr 2006 22:30:40 -0700 X-Auth-Received: from [192.168.0.50] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.6+UW06.03/8.13.5+UW06.03) with ESMTP id k3B5UWIU022664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 10 Apr 2006 22:30:38 -0700 Message-ID: <443B3EF8.3020308@u.washington.edu> Date: Mon, 10 Apr 2006 22:30:32 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Need /bin/sh script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 05:30:41 -0000 Hello again all, Just making a series of sh scripts to help automate updating and whatnot of my fileserver (since I am trying to avoid having mistakes occur with my system, and maybe help the community out a bit by providing some decent means of updating their own machines), and I was wondering if anyone could help me out with the following script I've developing (the grep if statements are incorrect..): #!/bin/sh # KC=""; cd /usr/src; if [ -n `grep -e s/KERNCONF=/ /etc/make.conf` ] # want to look for KERNCONF in /etc/make.conf then echo "enter in the kernel conf file full pathname:"; read KERNCONF; KC="KERNCONF=$KERNCONF"; fi if [ -n `grep -e s/NO_CLEAN=*yes*/ /etc/make.conf` ] // want to look for NO_CLEAN in /etc/make.conf -- is this really necessary? then cd sys; echo "cleaning sources" make clean; make cleandir; cd ..; fi echo "building kernel"; make buildkernel $KC; echo "installing kernel"; make installkernel $KC; echo "kernel compile complete. reboot to try new kernel"; TIA, -Garrett