From owner-freebsd-current@FreeBSD.ORG Tue Aug 9 19:37:36 2005 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 3F5B116A41F for ; Tue, 9 Aug 2005 19:37:36 +0000 (GMT) (envelope-from drvince@Safe-mail.net) Received: from tapuz.safe-mail.net (tapuz.safe-mail.net [213.8.161.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1EEB43F05 for ; Tue, 9 Aug 2005 19:10:23 +0000 (GMT) (envelope-from drvince@Safe-mail.net) Received: from www.Safe-mail.net by tapuz.safe-mail.net with Safe-mail (Exim 4.52) id 1E2ZUT-00088Y-Oe for freebsd-current@freebsd.org; Tue, 09 Aug 2005 15:10:21 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=N1-0105; d=Safe-mail.net; b=rg9Ce75tEdOpr+eISgZqpZhsQxKDz/KEPluV3S19+OjWesdvquRfcJcnAEWIYXQI 6h1YPsIT1WxZ0C4xFQarxNJz2zAvP1XiHuJxguuiZWr1Qs4jNc81kmNvcIwEbcvh WJ++AdibQMwaljJgh1+HzojVp5cSeFKdyQiJ3WSHZG4=; Received: from pc ([205.205.52.47]) by Safe-mail.net with https Date: Tue, 9 Aug 2005 15:10:21 -0400 From: drvince@Safe-mail.net To: freebsd-current@freebsd.org X-SMType: Regular X-SMRef: N1-uLBXxM-zn8 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SMSignature: YciQU3010KjraNk/pSCveQWU7UuXtmPB+rU68nswi37l06bmeE1bUqqBZPFQ/nyq mCddXZ1dKm3OE3B/XJr8MMHl4cAgZyQ9iELuaHyatvLH78qg4DDxGpm5WMq6ZK2h HTQHp6WSMta4gUh9THNTpn7atYjfeSBILnGJo30kwiE= Subject: More into /etc/rc.d/jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: drvince@anonymnet.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 19:37:36 -0000 Hi, I'm using jails inside md devices to limit the disk space each jail can use. It's working great but I have to start manually all of them at startup. Here's my drill: mdconfig -a -t vnode -f ${IMAGE} -u ${ID} fsck_ufs /dev/md${ID}c mount /dev/md${ID}c ${DEST} mount_devfs devfs ${DEST}/dev jail -l -U root ${DEST} ${FQDN} ${IP} /bin/sh /etc/rc Therefore, I can't use the /etc/rc.d/jail facility. So I thought, it would be good to add *fsck before mounting* and an optional mdconfig beforehand. jail_${NAME}_md_device="" # The device to attach or NO jail_${NAME}_image="" # The image file containing the jail, used with md_device jail_${NAME}_fsck_options="" # Options to pass to fsck In fsck_options I could put "-t ufs". Of course, /dev/md${ID}c must be present before mounting, could happen if the image isn't bsdlabel'ed. I'm a terrible coder, I could do it, but I'll need coaching and I've never made a patch. I would gladly hand that to someone else but I also need it to be done, I can't babysit the server forever. So, how does it sound? DrVince