From owner-freebsd-arch@FreeBSD.ORG Fri May 29 09:17:11 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE5E61065672; Fri, 29 May 2009 09:17:11 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id EBA5C8FC19; Fri, 29 May 2009 09:17:08 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from outgoing.leidinger.net (pD9E2EF66.dip.t-dialin.net [217.226.239.102]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 96C5684453C; Fri, 29 May 2009 11:00:48 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 6E1A42989DD; Fri, 29 May 2009 11:00:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1243587645; bh=ZdHGVSgh5qtjEsjQsD93+S58yNB8VS8oegJyYHZqyYs=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=XoQTcxzkHPBEsACYNz12326jCDHsEjh3zz4HwkBxT6zNLCsho3d3nU0Vjj99lSoSo VPHwekttPaX1NXV4IaIhuC0B1tfQe0h2nEmu7VfVCo9pJPgUvS1RVrD/tdHPUow5YC Sy2edIJ7RTWLlmykrS5jkcxfpetkj+RefDld2anzqAVRugeZwtFJZVpOfYkxUZe0A8 3iN2jquzho+LUXBPjiPsBh3Xf4ZmxP+SnDpiMUxtghk/yksLSEZmssL+Yd1dARy+GT Qt8TS3K1dxmudxeToN+/WNYy8sZ+nprL1vgcxJujCqpTNWKtGdJTpPGNRWJWD4qXhz RqQCgx55cARmw== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n4T90j8e017252; Fri, 29 May 2009 11:00:45 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 29 May 2009 11:00:44 +0200 Message-ID: <20090529110044.200461pczbdmklk4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 29 May 2009 11:00:44 +0200 From: Alexander Leidinger To: Nathan Lay References: <4A1F12E4.1060404@comcast.net> In-Reply-To: <4A1F12E4.1060404@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0 Cc: arch@freebsd.org, freebsd-current@freebsd.org Subject: Re: Profile rc idea X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 09:17:13 -0000 Quoting Nathan Lay (from Thu, 28 May 2009 18:40:36 -0400): > Hi list, > Wasn't sure which list this idea belongs, so I sent it here. It arch@ (cced) is the generic place to discuss architectural changes of subsystems. > would be interesting if rc was extended to support profiles. Each > profile would reflect a different system configuration. For example > profiles could describe the computing environment at: home, work, > friend's house, airplane, etc... The active profile the system uses > could be chosen based on some contingency condition. For example, > simply prompting the user to choose an rc profile at boot, or using > hardware to choose the profile (e.g. like location based contingency > using GPS hardware), or whatever... I guess this only pertains to > booting though, but rc seems like a natural place to do this. > Thoughts, comments? Yet another idea I have no time to try... You can already do this in rc.conf: ---snip--- location=at_home case ${location} in at_home) ifconfig_xx0="..." ... ;; at_work) ifconfig_xx0="..." ... ;; *) echo wrong location set exit 1 # alternatively use some kind of default setup ;; esac ---snip--- This way you need to know before where you are, or boot into single-user mode. You can also extend it to read a kenv ("location=$(/bin/kenv profile.location)"), this way you can specify the location in the loader (bonus points to implement a loader extension in forth to read a file which lists possible profiles and offer them in the menu). Bye, Alexander. -- "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" "No, just spots." http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137