Re: Daemons in schroot or how to start chroot automatically

2012-08-21 Thread Bob Proulx
Roger Leigh wrote: > Bob Proulx wrote: > > There are two issues. ... > > So one key question here: do you have /proc mounted inside the > chroot? No. I only do that if the task and applications I am running in the chroot require it. But for my typical chroot these are rarely required. Sure they

Re: Daemons in schroot or how to start chroot automatically

2012-08-16 Thread Roger Leigh
On Wed, Aug 15, 2012 at 06:54:56PM -0600, Bob Proulx wrote: > There are two issues. And I know that the /run transition was > discussed at length in debian-devel. Unfortunately I wasn't following > it then and only run into this problem now. I think using bind mounts > in either of the two cases

Re: Daemons in schroot or how to start chroot automatically

2012-08-15 Thread Bob Proulx
Roger Leigh wrote: > Bob Proulx wrote: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665827 > > Note that this is a bug against initscripts, not debianutils. Yes. But both are buggy! I also filed a bug against ischroot. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685034 > Is t

Re: Daemons in schroot or how to start chroot automatically

2012-08-15 Thread Roger Leigh
On Wed, Aug 15, 2012 at 05:58:03PM -0600, Bob Proulx wrote: > Roger Leigh wrote: > > Bob Proulx wrote: > > > I haven't submitted a bug yet but I always have problems with sysvinit > > > postinst depending upon ischroot and ischroot getting it wrong and > > > that leaving a broken /run - /var/run be

Re: Daemons in schroot or how to start chroot automatically

2012-08-15 Thread Bob Proulx
Roger Leigh wrote: > Bob Proulx wrote: > > I haven't submitted a bug yet but I always have problems with sysvinit > > postinst depending upon ischroot and ischroot getting it wrong and > > that leaving a broken /run - /var/run behind. You might hit that too. > > If this is still happening, please

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Ramon Hofer
On Mon, 2012-07-23 at 19:15 +0100, Roger Leigh wrote: > On Mon, Jul 23, 2012 at 06:27:22PM +0200, Ramon Hofer wrote: > > I now changed the stop function to (added the if test) to get rid of > > error messages when running `sid-sabnzbdplus stop` twice: > > stop_sab() { > > if [ -f /var/lib/sch

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Roger Leigh
On Mon, Jul 23, 2012 at 06:27:22PM +0200, Ramon Hofer wrote: > I now changed the stop function to (added the if test) to get rid of > error messages when running `sid-sabnzbdplus stop` twice: > stop_sab() { > if [ -f /var/lib/schroot/session/sid-sab ]; then > schroot -rq -c $NAME /etc/i

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Ramon Hofer
On Mon, 2012-07-23 at 10:25 +0100, Roger Leigh wrote: > On Sun, Jul 22, 2012 at 05:27:14PM +0200, Ramon Hofer wrote: > > On Son, 2012-07-22 at 15:58 +0100, Roger Leigh wrote: > > > On Sun, Jul 22, 2012 at 03:25:49PM +0200, Ramon Hofer wrote: > > > > On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wr

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Ramon Hofer
On Mon, 2012-07-23 at 11:34 +0100, Roger Leigh wrote: > On Sun, Jul 22, 2012 at 06:31:48PM +0200, Ramon Hofer wrote: > > On Sam, 2012-07-21 at 22:18 +0100, Roger Leigh wrote: > > > On Sat, Jul 21, 2012 at 11:54:58AM +, Ramon Hofer wrote: > > > > > > > Is there another one which I can use to se

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Roger Leigh
On Sun, Jul 22, 2012 at 06:31:48PM +0200, Ramon Hofer wrote: > On Sam, 2012-07-21 at 22:18 +0100, Roger Leigh wrote: > > On Sat, Jul 21, 2012 at 11:54:58AM +, Ramon Hofer wrote: > > > > > Is there another one which I can use to set specific mounts? > > > Like in my case the config dir in my ho

Re: Daemons in schroot or how to start chroot automatically

2012-07-23 Thread Roger Leigh
On Sun, Jul 22, 2012 at 05:27:14PM +0200, Ramon Hofer wrote: > On Son, 2012-07-22 at 15:58 +0100, Roger Leigh wrote: > > On Sun, Jul 22, 2012 at 03:25:49PM +0200, Ramon Hofer wrote: > > > On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wrote: > > > > I would also check the return status of schroot.

Re: Daemons in schroot or how to start chroot automatically

2012-07-22 Thread Ramon Hofer
On Sam, 2012-07-21 at 22:18 +0100, Roger Leigh wrote: > On Sat, Jul 21, 2012 at 11:54:58AM +, Ramon Hofer wrote: > > On Fri, 20 Jul 2012 17:32:14 +0100, Roger Leigh wrote: > > > > > On Fri, Jul 20, 2012 at 12:48:49PM +, Ramon Hofer wrote: > > >> On Fri, 20 Jul 2012 10:42:58 +0100, Roger Le

Re: Daemons in schroot or how to start chroot automatically

2012-07-22 Thread Ramon Hofer
On Son, 2012-07-22 at 15:58 +0100, Roger Leigh wrote: > On Sun, Jul 22, 2012 at 03:25:49PM +0200, Ramon Hofer wrote: > > On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wrote: > > > > > > Firstly, add schroot to Required-(Start|Stop), since you do > > > need it to be set up prior to starting new se

Re: Daemons in schroot or how to start chroot automatically

2012-07-22 Thread Roger Leigh
On Sun, Jul 22, 2012 at 03:25:49PM +0200, Ramon Hofer wrote: > On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wrote: > > > > Firstly, add schroot to Required-(Start|Stop), since you do > > need it to be set up prior to starting new sessions. > > Thanks for the hint! > I added $schroot at the end

Re: Daemons in schroot or how to start chroot automatically

2012-07-22 Thread Ramon Hofer
On Sam, 2012-07-21 at 22:05 +0100, Roger Leigh wrote: > On Sat, Jul 21, 2012 at 04:52:24PM +, Ramon Hofer wrote: > > On Sat, 21 Jul 2012 11:54:58 +, Ramon Hofer wrote: > > > > > I found what I did wrong: In the init.d script I used chroot instead of > > > schroot: > > > http://pastebin.com

Re: Daemons in schroot or how to start chroot automatically

2012-07-21 Thread Roger Leigh
On Sat, Jul 21, 2012 at 11:54:58AM +, Ramon Hofer wrote: > On Fri, 20 Jul 2012 17:32:14 +0100, Roger Leigh wrote: > > > On Fri, Jul 20, 2012 at 12:48:49PM +, Ramon Hofer wrote: > >> On Fri, 20 Jul 2012 10:42:58 +0100, Roger Leigh wrote: > >> > >> > On Thu, Jul 19, 2012 at 12:34:26PM +

Re: Daemons in schroot or how to start chroot automatically

2012-07-21 Thread Roger Leigh
On Sat, Jul 21, 2012 at 04:52:24PM +, Ramon Hofer wrote: > On Sat, 21 Jul 2012 11:54:58 +, Ramon Hofer wrote: > > > I found what I did wrong: In the init.d script I used chroot instead of > > schroot: > > http://pastebin.com/raw.php?i=Lamy4K4a > > > > Could you please help me with the cor

Re: Daemons in schroot or how to start chroot automatically

2012-07-21 Thread Ramon Hofer
On Sat, 21 Jul 2012 11:54:58 +, Ramon Hofer wrote: > I found what I did wrong: In the init.d script I used chroot instead of > schroot: > http://pastebin.com/raw.php?i=Lamy4K4a > > Could you please help me with the correct command? > Instead of `chroot /srv/chroot/sid /etc/init.d/sabnzbdplus

Re: Daemons in schroot or how to start chroot automatically

2012-07-21 Thread Ramon Hofer
On Fri, 20 Jul 2012 17:32:14 +0100, Roger Leigh wrote: > On Fri, Jul 20, 2012 at 12:48:49PM +, Ramon Hofer wrote: >> On Fri, 20 Jul 2012 10:42:58 +0100, Roger Leigh wrote: >> >> > On Thu, Jul 19, 2012 at 12:34:26PM +, Ramon Hofer wrote: >> >> I have some questions about starting daemons i

Re: Daemons in schroot or how to start chroot automatically

2012-07-21 Thread Ramon Hofer
On Fri, 20 Jul 2012 14:24:11 -0600, Bob Proulx wrote: > First I should say that schroot appears to have a lot more functionality > than I previously realized. I had thought it was just a fancy suid > chroot similar to 'dchroot' adding a security layer around chroot(2). > But it looks like it can

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Bob Proulx
First I should say that schroot appears to have a lot more functionality than I previously realized. I had thought it was just a fancy suid chroot similar to 'dchroot' adding a security layer around chroot(2). But it looks like it can do much more including building chroots on the fly and other r

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Roger Leigh
On Fri, Jul 20, 2012 at 12:48:49PM +, Ramon Hofer wrote: > On Fri, 20 Jul 2012 10:42:58 +0100, Roger Leigh wrote: > > > On Thu, Jul 19, 2012 at 12:34:26PM +, Ramon Hofer wrote: > >> I have some questions about starting daemons in a chroot environment or > >> rather about starting schroot o

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Ramon Hofer
On Fri, 20 Jul 2012 10:42:58 +0100, Roger Leigh wrote: > On Thu, Jul 19, 2012 at 12:34:26PM +, Ramon Hofer wrote: >> I have some questions about starting daemons in a chroot environment or >> rather about starting schroot on bootup. >> The reason I want to do this is to clean up my server. It'

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Ramon Hofer
Thanks for your answer, Bob! On Thu, 19 Jul 2012 21:28:52 -0600, Bob Proulx wrote: >> Installed sid $ sudo debootstrap sid /srv/chroot/sid/ >> http://ftp.ch.debian.org/debian/ > > I haven't submitted a bug yet but I always have problems with sysvinit > postinst depending upon ischroot and ischroo

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Roger Leigh
On Thu, Jul 19, 2012 at 12:34:26PM +, Ramon Hofer wrote: > I have some questions about starting daemons in a chroot environment or > rather about starting schroot on bootup. > The reason I want to do this is to clean up my server. It's a Squeeze > with an AMD64 kernel from backports. Some pac

Re: Daemons in schroot or how to start chroot automatically

2012-07-20 Thread Roger Leigh
On Thu, Jul 19, 2012 at 09:28:52PM -0600, Bob Proulx wrote: > Ramon Hofer wrote: > > Installed sid > > $ sudo debootstrap sid /srv/chroot/sid/ http://ftp.ch.debian.org/debian/ > > I haven't submitted a bug yet but I always have problems with sysvinit > postinst depending upon ischroot and ischroot

Re: Daemons in schroot or how to start chroot automatically

2012-07-19 Thread Bob Proulx
Ramon Hofer wrote: > Installed sid > $ sudo debootstrap sid /srv/chroot/sid/ http://ftp.ch.debian.org/debian/ I haven't submitted a bug yet but I always have problems with sysvinit postinst depending upon ischroot and ischroot getting it wrong and that leaving a broken /run - /var/run behind. You

Daemons in schroot or how to start chroot automatically

2012-07-19 Thread Ramon Hofer
Hi all I have some questions about starting daemons in a chroot environment or rather about starting schroot on bootup. The reason I want to do this is to clean up my server. It's a Squeeze with an AMD64 kernel from backports. Some packages are from testing which gives me problems because of de