Re: rc.d/jail and jail.conf

2013-04-01 Thread Jamie Gritton
On 03/31/13 21:53, Ian Smith wrote: > On Sun, 31 Mar 2013 22:58:33 +0200, Dirk Engling wrote: >> Maybe meeting at a BSDcon over a beer would help ;) > > Unlikely to hurt, anyway :) Perhaps I need to plan on going to BSDCan after all... - Jamie ___ fre

Re: rc.d/jail and jail.conf

2013-03-31 Thread Ian Smith
On Sun, 31 Mar 2013 22:58:33 +0200, Dirk Engling wrote: > On 31.03.13 22:01, Miroslav Lachman wrote: > > >> So I guess, I am out of luck here, because users used to think of their > >> jails as what they saw in the hostname field on jls. If I am writing > >> tools that use jail_getid to map t

Re: rc.d/jail and jail.conf

2013-03-31 Thread army.of.root
On 2013-04-1 04:01 , Paul Schenkeveld wrote: On Sun, Mar 31, 2013 at 09:14:23PM +0200, Dirk Engling wrote: On Sun, 31 Mar 2013, Jamie Gritton wrote: If you don't mind some slightly difficult error messages, you can always "disable" a jail with exec.prestart="false". jail(8) requires all comma

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/31/13 14:58, Dirk Engling wrote: On 31.03.13 22:01, Miroslav Lachman wrote: So I guess, I am out of luck here, because users used to think of their jails as what they saw in the hostname field on jls. If I am writing tools that use jail_getid to map the jailname to the jid, it will never

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/31/13 20:01, Paul Schenkeveld wrote: On Sun, Mar 31, 2013 at 09:14:23PM +0200, Dirk Engling wrote: On Sun, 31 Mar 2013, Jamie Gritton wrote: If you don't mind some slightly difficult error messages, you can always "disable" a jail with exec.prestart="false". jail(8) requires all command

Re: rc.d/jail and jail.conf

2013-03-31 Thread Paul Schenkeveld
On Sun, Mar 31, 2013 at 09:14:23PM +0200, Dirk Engling wrote: > > On Sun, 31 Mar 2013, Jamie Gritton wrote: > > > If you don't mind some slightly difficult error messages, you can always > > "disable" a jail with exec.prestart="false". jail(8) requires all > > commands to succeed, and in particul

Re: rc.d/jail and jail.conf

2013-03-31 Thread Dirk Engling
On 31.03.13 22:01, Miroslav Lachman wrote: >> So I guess, I am out of luck here, because users used to think of their >> jails as what they saw in the hostname field on jls. If I am writing >> tools that use jail_getid to map the jailname to the jid, it will never >> match that hostname and I also

Re: rc.d/jail and jail.conf

2013-03-31 Thread Miroslav Lachman
Dirk Engling wrote: On 30.03.13 21:38, Miroslav Lachman wrote: jail_myjail_flags="-l -U root -n myjail" When trying to pass a my hostname (foo.com) as jailname like that, jail(8) will complain jail: jail "foo" not found as it does not allow periods in the jailname. This seems like an unf

Re: rc.d/jail and jail.conf

2013-03-31 Thread Dirk Engling
On Sun, 31 Mar 2013, Jamie Gritton wrote: If you don't mind some slightly difficult error messages, you can always "disable" a jail with exec.prestart="false". jail(8) requires all commands to succeed, and in particular won't even create a jail when one of the prestart commands fails. This vi

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/31/13 12:58, Dirk Engling wrote: On 31.03.13 20:31, Jamie Gritton wrote: That seems reasonable, but using a jail list in rc.conf may suffice. It is less error prone to just use 'jail_list=*' in rc.conf and disable jails per config block, and then issue a warning like 'Skipping disabled

Re: rc.d/jail and jail.conf

2013-03-31 Thread Dirk Engling
On 31.03.13 20:31, Jamie Gritton wrote: > That seems reasonable, but using a jail list in rc.conf may suffice. It is less error prone to just use 'jail_list=*' in rc.conf and disable jails per config block, and then issue a warning like 'Skipping disabled jail(s) foo, bar, baz'. (Although I see

Re: rc.d/jail and jail.conf

2013-03-31 Thread Dirk Engling
On 30.03.13 21:38, Miroslav Lachman wrote: > jail_myjail_flags="-l -U root -n myjail" When trying to pass a my hostname (foo.com) as jailname like that, jail(8) will complain jail: jail "foo" not found as it does not allow periods in the jailname. This seems like an unfortunate limitation, as

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/31/13 11:09, Miroslav Lachman wrote: Jamie Gritton wrote: On 03/31/13 09:12, Miroslav Lachman wrote: >> Is there a way to disable jail defined in jail.conf? (to avoid jail2_list in rc.conf) I'm not sure what you're asking. You want a jail in jail.conf that's not started up? Yes, I am

Re: rc.d/jail and jail.conf

2013-03-31 Thread Miroslav Lachman
Jamie Gritton wrote: On 03/31/13 09:12, Miroslav Lachman wrote: Jamie Gritton wrote: On 03/30/13 14:59, Dirk Engling wrote: On Sat, 30 Mar 2013, Nicolas de Bari Embriz Garcia Rojas wrote: If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like:

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/31/13 09:12, Miroslav Lachman wrote: Jamie Gritton wrote: On 03/30/13 14:59, Dirk Engling wrote: On Sat, 30 Mar 2013, Nicolas de Bari Embriz Garcia Rojas wrote: If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like: jail2_list="jail1 jail

Re: rc.d/jail and jail.conf

2013-03-31 Thread Miroslav Lachman
Jamie Gritton wrote: On 03/30/13 14:59, Dirk Engling wrote: On Sat, 30 Mar 2013, Nicolas de Bari Embriz Garcia Rojas wrote: If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like: jail2_list="jail1 jail2" Thanks, I suppose it mimicks the way rc

Re: rc.d/jail and jail.conf

2013-03-31 Thread Jamie Gritton
On 03/30/13 14:59, Dirk Engling wrote: On Sat, 30 Mar 2013, Nicolas de Bari Embriz Garcia Rojas wrote: If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like: jail2_list="jail1 jail2" Thanks, I suppose it mimicks the way rc.d/jail has handled it

Re: rc.d/jail and jail.conf

2013-03-30 Thread Miroslav Lachman
Dirk Engling wrote: On 30.03.13 21:38, Miroslav Lachman wrote: There is a way, you should use flags. I discussed this topic with bz@ few years ago and this is the official recommendation how newly added features should be used without changes in rc.d/jail jail_myjail_flags="-l -U root -n myjai

Re: rc.d/jail and jail.conf

2013-03-30 Thread Dirk Engling
On 30.03.13 21:38, Miroslav Lachman wrote: > There is a way, you should use flags. I discussed this topic with bz@ > few years ago and this is the official recommendation how newly added > features should be used without changes in rc.d/jail > > jail_myjail_flags="-l -U root -n myjail" Thanks, I

Re: rc.d/jail and jail.conf

2013-03-30 Thread Dirk Engling
On Sat, 30 Mar 2013, Nicolas de Bari Embriz Garcia Rojas wrote: If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like: jail2_list="jail1 jail2" Thanks, I suppose it mimicks the way rc.d/jail has handled it. I just wondered if there's a way to

Re: rc.d/jail and jail.conf

2013-03-30 Thread Nicolas de Bari Embriz Garcia Rojas
If for starting at boot time when using jail.conf you can use the sysutils/jail2 port If I am right you can define the order of start for jails in the jail2_list (rc.conf), something like: jail2_list="jail1 jail2" regards. On Mar 30, 2013, at 5:33 PM, Dirk Engling wrote: > Dear jail ha

Re: rc.d/jail and jail.conf

2013-03-30 Thread Miroslav Lachman
Dirk Engling wrote: if I follow the development correctly, the jail(8) command was augmented to make the rc.d/jail script obsolete. However when I want to use the rc system to start my jails, I am stuck with convincing rc.d/jail to not fail for missing _hostname or _rootdir. Jails in any RELEAS

rc.d/jail and jail.conf

2013-03-30 Thread Dirk Engling
Dear jail hackers, if I follow the development correctly, the jail(8) command was augmented to make the rc.d/jail script obsolete. However when I want to use the rc system to start my jails, I am stuck with convincing rc.d/jail to not fail for missing _hostname or _rootdir. How am I supposed to h