[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ports



nullfs works great, I use it all the time. So much I automated it. 

[matt@jails] ~ % ./jail_manage.sh simerson
running as matt, using sudo
Entering jail simerson
    mount_nullfs /usr/ports /home/jails/simerson/usr/ports
0 problem(s) in your installed packages found.
[root@simerson] / # do some stuff
[root@simerson] / # exit
exit
all done!
    /sbin/umount /home/jails/simerson/usr/ports
[matt@jails] ~ %

If you're interested in the script, I've posted it to this list in the past:  https://elektropost.org/ezjail/msg00166.html

The best feature is the "all" target, that drops me into each jail sequentially. It's very useful when an exploit for software that I use in every jail needs to be updated. 

Matt

On Jan 9, 2012, at 8:13 PM, Glen Barber wrote:

> On Mon, Jan 09, 2012 at 11:06:38PM -0500, alexus wrote:
>> can I somehow link/share (nullfs?) my existing /usr/ports (from host) to jails?
>> 
> 
> You can't use a symlink for this.  nullfs mount should be okay, I
> haven't tried.
> 
> Glen
> 
>> P.S. I gotta say ezjail is rulez ;p, so far i'm luvin it and best of
>> all it's written in shell :))
>> 
>> 
>> On Mon, Jan 9, 2012 at 10:59 PM, Glen Barber <glen.j.barber AT gmail DOT com> wrote:
>>> On Mon, Jan 09, 2012 at 10:45:15PM -0500, alexus wrote:
>>>> I just created this jail "b" using ezjail-admin (v3.2)
>>>> 
>>>> b# uname -a
>>>> FreeBSD b 9.0-RC3 FreeBSD 9.0-RC3 #0: Sun Dec  4 08:56:36 UTC 2011
>>>> root AT farrell.cse.buffalo DOT edu:/usr/obj/usr/src/sys/GENERIC  amd64
>>>> b# cd /usr/ports
>>>> /usr/ports: No such file or directory.
>>>> b# ls -ld /usr/ports
>>>> lrwxr-xr-x  1 root  wheel  19 Jan 10 03:20 /usr/ports -> /basejail/usr/ports
>>>> b#
>>>> 
>>>> I'm trying to understand how does /usr/ports works I see it created a
>>>> symbolic link to /basejail/usr/ports yet /basejail/usr/ports doesn't
>>>> exist inside of jail
>>>> 
>>> 
>>> It would have, if you had specified '-P' with 'ezjail-admin install'.
>>> 
>>> You can extract the ports tree to /basejail/usr/ports from the host
>>> machine with:
>>> 
>>>  portsnap extract -p ${jailsdir}/basejail/usr/ports
>>> 
>>> Replace 'jailsdir' with the top level 'jails' directory.
>>> 
>>> Glen
>>> 
>> 
>> 
>> 
>> -- 
>> http://alexus.org/

Attachment: smime.p7s
Description: S/MIME cryptographic signature