help-cfengine
[Top][All Lists]
Advanced

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

processes: chroot


From: Pe5kyTac0
Subject: processes: chroot
Date: Fri, 04 Feb 2005 14:47:25 -0800
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hi All

Debian Sarge (testing)
CFengine 2.1.10

I seem to have two problems. Both currently have work arounds.

Problem 1)

I have a tftp server I ma able to chroot by hand.
So I am confident the correct files have been copied to
the directory. What I want to do is have CFengine start the
daemon chrooted via the processes: command.

I would think one of the following should work.

processes:
"atftpd" signal=cont restart "/var/chroot/tftpd/usr/sbin/atftpd --daemon --port 69 --user tftpuser" chroot=/var/chroot/tftpd

or

processes:
"atftpd" signal=cont restart "/usr/sbin/atftpd --daemon --port 69 --user tftpuser" chroot=/var/chroot/tftpd

Both report the following (with different paths of course:
*********************************************************************
 Main Tree Sched: processes pass 1 @ Fri Feb  4 14:33:24 2005
*********************************************************************

cfengine:: Running process command /bin/ps auxw
Defining classes
DoSignals(atftpd)
Existing restart sequence found (/var/chroot/tftpd/usr/sbin/atftpd --daemon --port 69 --user tftpuser) cfengine:: Executing shell command: /var/chroot/tftpd/usr/sbin/atftpd --daemon --port 69 --user tftpuser
(Setting umask to 77)
cfengine:: (Done with /var/chroot/tftpd/usr/sbin/atftpd --daemon --port 69 --user tftpuser)
-------------------------------------------

But neither of them start the daemon. If I remove "chroot=/var/chroot/tftpd" it runs find.

The following does work, which is what I am doing for now.

processes:
"atftpd" signal=cont restart "/usr/sbin/chroot /var/chroot/tftpd /usr/sbin/atftpd --daemon --port 69 --user tftpuser"

problem 2)

Notice the processes above show a signal of "cont". I want to
not have to use the signal, but the restart would not work unless I had
one. I even tried to work around the issue by using "elsedefine" with
an Installable class in shellcommands. But it only worked when I declared a signal. The docs show signals as optional.

Questions
1) How should I have CFengine chroot starting programs?
2) Are signals to processes optional and/or is this fixed in later versions?

Thanks. This is a great list.

--
Pe5ky Tac0
--------------
Yum, Fish Tacos !!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]