From owner-freebsd-current@FreeBSD.ORG Sat Nov 8 08:46:32 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F29116A4CE; Sat, 8 Nov 2003 08:46:32 -0800 (PST) Received: from mailhub02.unibe.ch (mailhub02.unibe.ch [130.92.9.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8245843FEC; Sat, 8 Nov 2003 08:46:31 -0800 (PST) (envelope-from roth@lara.unibe.ch) Received: from localhost (localhost [127.0.0.1]) by mailhub02.unibe.ch (Postfix) with ESMTP id 4934D77242; Sat, 8 Nov 2003 17:46:30 +0100 (MET) Received: from mailhub02.unibe.ch ([127.0.0.1]) by localhost (mailhub02 [127.0.0.1:10024]) (amavisd-new) with LMTP id 25175-01-59; Sat, 8 Nov 2003 17:46:29 +0100 (MET) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub02.unibe.ch (Postfix) with ESMTP id 4D5AD77257; Sat, 8 Nov 2003 17:46:29 +0100 (MET) Received: from lara.unibe.ch (lara [130.92.64.90]) by asterix.unibe.ch (8.11.7p1+Sun/8.11.7) with ESMTP id hA8GkT509769; Sat, 8 Nov 2003 17:46:29 +0100 (MET) Received: (from roth@localhost) by lara.unibe.ch (8.12.9+Sun/8.12.9/Submit) id hA8GkSCY003428; Sat, 8 Nov 2003 17:46:28 +0100 (MET) Date: Sat, 8 Nov 2003 17:46:28 +0100 From: Tobias Roth To: freebsd-current@freebsd.org Message-ID: <20031108164628.GA3385@lara.unibe.ch> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Operating-System: SunOS lara 5.9 Generic_112233-04 sun4u sparc SUNW,Ultra-5_10 X-Virus-checked: by University of Berne cc: freebsd-mobile@freebsd.org Subject: PLEASE TEST: (laptop) autoconf at boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 16:46:32 -0000 Hi I'd like to present some patches to teach FreeBSD to automatically configure itself depending on what network it is started in. The system depends on rcng, so 5.x is a requirement. The setup of the various network profiles is done manually, after that, whenever the laptop boots or wakes up from suspend, it detects where it is located and configures itself accodringly. Please send all comments to freebsd-current so the discussion is not scattered over several mailing lists. How to patch: cd / fetch http://depot.fsck.ch/profile.diff patch < profile.diff rm /etc/rc.d/profile.orig /usr/share/man/man8/profile.8.orig chmod 555 /etc/rc.d/profile man profile Features: - unattended startup, the laptop discovers automatically in what network it is started - read-only root partitions are supported - unintrusive. getting rid of everything profile-related is just a matter of turning it off in rc.conf and rm'ing the profile dir - everything under /etc is customizable per environment, not just the network Drawbacks: - setup is a bit tedious - autodetection after suspend/resume does not work completely yet - during normal operation, changes to /etc are not straight forward anymore. see the manpage for details. Notes: - I already have an idea about how to fix suspend/resume support. But as this involves some more changes to the system I'd like to hear a few opinions on the profile idea as a whole before starting with that. - The arguments for mdmfs/newfs are somewhat arbitrary. I just chose what seemed to work, someone with more insight might come up with a better sort of switches.