Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Oct 2015 08:09:26 +0000
From:      krad <kraduk@gmail.com>
To:        Mark Felder <feld@freebsd.org>
Cc:        galtsev@kicp.uchicago.edu,  FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: /etc/jail.conf documentation?
Message-ID:  <CALfReycOZ0xS5kGJV2kVYMRceTdP-08jBbGXfLX2BK9=hTHWsg@mail.gmail.com>
In-Reply-To: <1446126519.3886654.423612921.572AA6CD@webmail.messagingengine.com>
References:  <49230.128.135.52.6.1446047977.squirrel@cosmo.uchicago.edu> <1446064085.1148620.422968569.0E47599D@webmail.messagingengine.com> <20953.128.135.52.6.1446065026.squirrel@cosmo.uchicago.edu> <CALfReycwGJfBsx1JB_HOpwRXj2BPt9JTDAFPZHHC4HA=-fiisw@mail.gmail.com> <1446126519.3886654.423612921.572AA6CD@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@FreeBSD.org
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALfReycOZ0xS5kGJV2kVYMRceTdP-08jBbGXfLX2BK9=hTHWsg>