/etc/jail.conf documentation?
krad
kraduk at gmail.com
Fri Oct 30 08:09:48 UTC 2015
You are correct, but i seem to remember having some issues at the time and
this work around got me past them. I probably need to look at it again as
it was a while ago.
On 29 October 2015 at 13:48, Mark Felder <feld at freebsd.org> wrote:
>
>
> On Thu, Oct 29, 2015, at 07:17, krad wrote:
> > here is an extract from one of my jail configs which shows a few other
> > things to play with. Remember vnet and pf dont play at present.
> >
> >
> > # Typical static defaults:
> > # Use the rc scripts to start and stop jails. Mount jail's /dev.
> > exec.start = "/bin/sh /etc/rc";
> > exec.stop = "/bin/sh /etc/rc.shutdown";
> > exec.clean;
> > mount.devfs;
> >
> >
> > # Dynamic wildcard parameter:
> > # Base the path off the jail name.
> > path = "/jails/$name";
> >
> >
> > emby {
> > host.hostname = "emby.intranet";
> > vnet.interface = emby_a;
> > vnet;
> > exec.prestart = "ifconfig emby_a destroy || true ";
> > exec.prestart += "ifconfig emby_b destroy || true";
> > exec.prestart += "ifconfig epair8 create up";
> > exec.prestart += "ifconfig epair8a name emby_a";
> > exec.prestart += "ifconfig epair8b name emby_b";
> > exec.prestart += "ifconfig emby_b up";
> > exec.prestart += "ifconfig bridge0 addm emby_b";
> > exec.prestart += "ifconfig emby_a ether 02:ff:25:fc:05:da";
> > exec.prestart += " df | grep -q /jails/emby/videos ||
> > mount
> > -t nullfs -o rw /videos /jails/emby/videos/";
> > exec.poststop = "ifconfig emby_a destroy";
> > exec.poststop += "ifconfig emby_b destroy";
> > exec.poststop += "/sbin/umount /jails/emby/videos || true ";
> > exec.start += "/sbin/dhclient emby_a";
> > exec.start += "ifconfig emby_a inet6 accept_rtadv";
> > exec.start += "/etc/rc.d/rtsold start";
> > }
> >
>
> You don't need to handle mounting filesystems this way. Just define
>
> mount.fstab = /etc/fstab.$name;
>
> and then create /etc/fstab.emby
>
> Put your fstab entries in that file and it will do the right thing for
> you automatically.
>
>
> --
> Mark Felder
> ports-secteam member
> feld at FreeBSD.org
>
More information about the freebsd-questions
mailing list