From owner-freebsd-current@FreeBSD.ORG Tue Apr 11 22:56:58 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 DD0E316A401 for ; Tue, 11 Apr 2006 22:56:57 +0000 (UTC) (envelope-from ricardo_bsd@yahoo.com.br) Received: from smtp101.mail.mud.yahoo.com (smtp101.mail.mud.yahoo.com [209.191.85.211]) by mx1.FreeBSD.org (Postfix) with SMTP id BC13643D73 for ; Tue, 11 Apr 2006 22:56:53 +0000 (GMT) (envelope-from ricardo_bsd@yahoo.com.br) Received: (qmail 60181 invoked from network); 11 Apr 2006 22:56:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Received:Date:To:Subject:From:Organization:Content-Type:MIME-Version:Content-Transfer-Encoding:Message-ID:User-Agent; b=52peMdFPsI7oxgHe1bGbVFKJ48SFCf3g4e3iWYdIP/BUE+WQSv3SFRyD+HJf6eMFwWxOHL8pMqbftIsuEOfV0tFnFvLyPgnnWutfm+wEHKwRzdEaDTB22ojMygNDqRqXfDQSzCUvEjPgAXPg79D8NlVJ9oxMVE3jL67SosrFZUU= ; Received: from unknown (HELO localhost) (ricardo?bsd@201.1.76.169 with login) by smtp101.mail.mud.yahoo.com with SMTP; 11 Apr 2006 22:56:52 -0000 Date: Tue, 11 Apr 2006 16:56:56 -0300 To: freebsd-current@freebsd.org From: "Ricardo A. Reis" Organization: UNIFESP Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera Mail/9.00 (FreeBSD) Subject: [RFC] Ideas for new distribuition: base-jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 11 Apr 2006 22:56:58 -0000 Brian and Anish, I don't have any prototyping for this, but is not a problem i public my idea for collect opnions and new possibilities , i think that integration with makefile is very useful because FreeBSD Community is accustomed with make options. Using makefile approach is very easy integrate ncurse menu `OPTIONS` like ports for interact create, the make variables in non-interactive create is easy set for include file, like this while read DESTDIR JNAME JROOT JHOSTNAME JIP;do cd $(DISTBASE)/base && ./install.sh DESTDIR=$(DESTDIR) >/tmp/jail.XXXXX 2>&1 & exec 3<&0 exec >> $RCCONFJAIL cat < On Mon, Apr 10, 2006 at 05:27:18PM -0300, Ricardo A. Reis wrote: > > I think in one new distribution, this idea is for decrease > > create time for start jails after release install, the base-jail > > is distribute in CD1. After install RELEASE and update with > > freebsd-update a admin create a jail > > with ( cd /usr/local/base-jail; make jail DESTDIR=/XXXX ) very > > fast > > How about prototyping this? I offer as a starting point: > > -- 8< > -------------------------------------------------------------- > DISTBASE?=/cdrom > DESTDIR?=. > jail: > cd $(DISTBASE)/base && ./install.sh DESTDIR=$(DESTDIR) > -- 8< > -------------------------------------------------------------- > > What else does it need to have? I guess you could automatically add > jail_* entries in /etc/rc.conf, but it would need to prompt for > several pieces of information in order to be able to set them all. > > jail_enable="YES" > jail_list="foo" > jail_foo_rootdir="/XXXX" > jail_foo_hostname="foo.example.com" > jail_foo_ip="192.168.1.1" > jail_foo_exec_start="/bin/sh /etc/rc" > jail_foo_exec_stop="/bin/sh /etc/rc.shutdown" > jail_foo_devfs_enable="YES" > jail_foo_devfs_ruleset="devfsrules_jail" > > You might also want to prompt for, and set, the jail's root > password. > > You could copy some key files from the host environment assuming > they will be the same within the jail (e.g. /etc/resolv.conf, > /etc/hosts, /etc/localtime) > > You might also want a template directory for other files to be > installed into the jail (e.g. /etc/rc.conf might have > sshd_enable="YES" as its default), but the contents of these files > are likely to be very specific to your particular needs. The same > goes for installing additional distribution sets or packages. > Perhaps the jail builder could invoke sysinstall somehow, such that > it can be driven from an install.cfg script. This isn't done in a Makefile, but a normal shell script but it's what I use to setup jails. It makes setup incredibly simple. Run it and follow the prompts, the non-interactive mode doesn't work yet. http://am-productions.biz/docs/make-jail.sh I just updated it to work with the /etc/rc.d/jail changes in CURRENT so it might be broken to everything else. An MFC should be imminent for RELENG_6. I intentionally omitted adding jail_enable="YES" to rc.conf to force the user to actually know what they're enabling. _______________________________________________________ Abra sua conta no Yahoo! Mail: 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. http://br.info.mail.yahoo.com/