From owner-freebsd-questions@FreeBSD.ORG Tue May 31 13:04:31 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0483106566C for ; Tue, 31 May 2011 13:04:31 +0000 (UTC) (envelope-from xnooby@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7988FC12 for ; Tue, 31 May 2011 13:04:30 +0000 (UTC) Received: by bwz12 with SMTP id 12so5366218bwz.13 for ; Tue, 31 May 2011 06:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=/YTuJibb+e51MVjszA6SGSHKIvjPRwvN7dpfnubmFwk=; b=szff9Bb0mhxFzBqsi+DZ/bo+Hr8B94tlni+oSTvsMACsQgUJqfhF1/3rx+wPxH3C92 tJpk2wAVw4HOAMgeLvCF4J5PLZISNCLGGniPYCRNOHRsIyJM5izk0QhQSSR2S1zFnXXR EBHcDQjANVOGca7J43OXeNEx6cMGhurbUQxWw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=xmVyIrbfhJCY3Dn4FHu6tkzQ9kc+1KLMKDxtMbzlJ36WoCxrOmywqp3RZejh1+zpjt dW498DLhfXIVV79MxI1grwXf1IwFbUKyr+h78Z1Hoa7SSDZOF4o49/DrcEAcgrOIIZOC C+PzZCdTpuG+VRIXpKm9e0fVm1mjVay8UrOdY= MIME-Version: 1.0 Received: by 10.204.82.224 with SMTP id c32mr486072bkl.161.1306847070124; Tue, 31 May 2011 06:04:30 -0700 (PDT) Received: by 10.204.25.78 with HTTP; Tue, 31 May 2011 06:04:30 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 May 2011 09:04:30 -0400 Message-ID: From: Xn Nooby To: FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: A small script to customize FreeBSD 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, 31 May 2011 13:04:31 -0000 On Tue, May 31, 2011 at 5:19 AM, Chris Rees wrote: > On 31 May 2011 04:19, Xn Nooby wrote: >> Hello. =A0I wrote a script to install FreeBSD 8.2 on to a real machine, >> or a 64-bit Virtualbox VM. =A0It has a modular approach where you can >> pick which functions will be run on a different target system. It can >> be tweaked easily. =A0I wrote it so that I could do a quick "plain >> vanilla install", and then run this script to set up my user, SVN >> server, gnome, firefox4, flash, nvidia driver, vbox additons, and >> other things. I thought I would post it in case other beginners need >> some thing like this to help them configure a machine. =A0I started off >> with detailed notes, then thought I might as well script it. When you >> run it, the only user interaction is having to enter the user password >> twice. =A0Let me know if anyone has any suggestions. > > How about using $1 instead of theuser? > > You could always have ${1:-theuser} instead to have a default of > theuser, but take the value for username as the first argument. > > Chris > That's a good idea. The user was originally called "me", but I wanted something that could be searched and replaced without breaking "gnome" and "home". Using a parameter would be even better, thanks!.