You are not logged in.

#1 2008-10-07 12:18:24

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

autostarting a daemon from a 32 bit chroot

hello smile

i have arch64 and a brother dcp 135c printer. brother does supply drivers for linux but unfortunatelly for 32 bits only. because i have a 32 bit chroot, i thought i would just remove cups, and then inside the chroot install cups again, install the driver and add the printer. i did it and it all works fine except for one thing: i don't know how to autostart the cups deamon (inside the chroot) on boot.

i tried adding cups32 to my list of deamons in rc.conf. first what i put in it was

schroot -p /etc/rc.d/cups $1

but it didn't work, so i tried

chroot /opt/arch32
/etc/rc.d/cups $1
exit

but with no more luck.

here's what i get when i try to start cups not from inside chroot:

# schroot -p /etc/rc.d/cups start
I: [Arch32-801204e2-dcae-4c65-901f-145b605d70e9 chroot] Running command: "/etc/rc.d/cups start"
:: Starting CUPS Daemon                                                                                                              [DONE] 

ps aux | grep cups
root      6027  0.0  0.1   8752   996 pts/0    S+   14:13   0:00 grep cups

as opposed to

root      6036  0.0  0.5   8720  2628 ?        Ss   14:15   0:00 /usr/sbin/cupsd

when started from inside chroot.

could anyone help me please?

Offline

#2 2010-06-01 02:22:16

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: autostarting a daemon from a 32 bit chroot

I am having the same issue.  I want to start distccd, but when I run schroot /etc/rc.d/distccd start, it says [DONE] as usual, but the daemon doesn't come up in ps -A.  if I manually chroot into /opt/arch32, I can issue the same command and it'll stay running.  I'm assuming that schroot sandboxes the environment, and when the command releases the terminal, it kills all the processes associated to it.

How can I keep daemons running when they are started by schroot?

Offline

#3 2010-06-01 12:34:54

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: autostarting a daemon from a 32 bit chroot

Try something like this:

1 - Create a script inside the chroot dir that will start your daemon and then exit the chroot.
2 - Try using 'sudo chroot /path/to/chroot /path/to/script/inside/chroot'

It is not as convenient as schroot but if it works it's better than nothing. If you use this during startup then there is no need to use sudo because you will have root privileges anyway.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB