[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: class-dependent class definition
From: |
Adrian Phillips |
Subject: |
Re: class-dependent class definition |
Date: |
22 Nov 2002 07:23:44 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Edward" == Edward O'Connor <oconnor@soe.ucsd.edu> writes:
Edward> Hi there. I've recently set up sudo across our site via
Edward> cfengine. The cfengine recipe first attempts to determine
Edward> if sudo is installed, and, if it is not, it attempts to
Edward> install it.
Edward> I first tried to do something like this:
classes:
freebsd::
sudo_installed = ( "/usr/sbin/pkg_info -x sudo" )
redhat::
sudo_installed = ( "/bin/rpm -q sudo" )
shellcommands:
freebsd.!sudo_installed::
...
redhat.!sudo_installed::
...
Hmm, how about (untested) :-
control:
freebsd::
pkg_cmd = ( /usr/sbin/pkg_info -x )
redhat::
pkg_cmd = ( /bin/rpm -q )
classes:
sudo_installed = ( "${pkg_cmd} sudo" )
Sincerely,
Adrian Phillips
--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]