#!/bin/sh # # $Id: jail.sh,v 1.3 2007/05/23 11:34:26 chfl4gs Exp $ # ##Initial development jail setup # for md(4) mount at startup gcc mount_md.c -o mount_md && cp mount_md /usr/sbin/mount_md # Jail directory J=/usr/home/jail/builder I=/usr/home/jail/img mkdir -p $J mkdir -p $I # creating 4GB mem disk dd of=$I/dev.rp.img bs=1024 seek=6291456 count=0 mdconfig -a -t vnode -f $I/dev.rp.img -u 0 newfs -U /dev/md0 mount /dev/md0 $J # Host modifications cat >> /etc/rc.conf < /etc/fstab.builder <> /etc/sysctl.conf < $J/etc/rc.conf <