bug-cfengine
[Top][All Lists]
Advanced

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

Re: multiple classes that should be done in one shellcommands secti on w


From: Mark . Burgess
Subject: Re: multiple classes that should be done in one shellcommands secti on won't work...
Date: Fri, 24 May 2002 10:40:09 +0200 (MET DST)

The problem seems to be that class definitions did were forgotten
for action=create in files. This will be fixed in 2.0.2

Mark


On  8 May, Juha Ylitalo wrote:
> Platform: Solaris 8
> Cfengine version: 2.0.1
> db3, libgcc, gcc, openssl from sunfreeware.com
> 
> Problem descriptions are following:
> - none of my "/some/dir define=classes" seem to work, it simply doesn't
>   tricker commands under shellcommands.
> - when I have two "files", which both define Installable class, only one
> of them gets executed in shellcommands section. Which one it is, can be
> changed by switching lines order in files section.
> 
> What I am trying to achieve with this stuff is that when system comes
> up, it would check if we have all relevant software installed locally
> and if we don't, we would install it from JumpStart server, which has
> the stuff in tar.gz or SVR4 packages in its NFS exports area.
> 
> Here is example about that second part:
> =======================
> config files
> =======================
> control:
>   NDTServers::
>     AddInstallable = ( InstallJRE )
>     AddInstallable = ( Installqftest )
> #####################################################################
> # directories
> #####################################################################
> files:
>   NDTServers::
>     /usr/local/qftest action=create define=Installqftest
>     /usr/local/j2re1.4.0 action=create define=InstallJRE
> directories:
>   NDTServers::
>     /opt/ndt
>     /usr/home/jylitalo/.qftest
>     /usr/home/qa/.qftest
>     /mnt/baitblaster
> 
> #####################################################################
> # shellcommands
> #####################################################################
> shellcommands:
>   InstallJRE::
>     "/usr/bin/rm -rf /usr/local/j2re1.4.0"
>     "/usr/bin/gzip -dc
> /mnt/baitblaster/Solaris_8/pkgs/j2re-1_4_0-solsparc.tar.\gz | ( cd
> /usr/local ; /usr/sbin/tar xf - )"
>   Installqftest::
>     "/usr/bin/rm -rf /usr/local/qftest"
>     "/usr/bin/gzip -dc
> /mnt/baitblaster/Solaris_8/pkgs/qftest-0.96.0.tar.gz | (\ cd /usr/local
> ; /usr/bin/tar xf - )"
>     "/usr/bin/cp /mnt/baitblaster/Solaris_8/pkgs/qftest_license
> /usr/local/qfte\st/license" umask=022
>   MustReboot::
>     "/usr/sbin/reboot"
> 
> =======================
> cfagent -v printout
> =======================
> *********************************************************************
>  Main Tree Sched: files pass 1 @ Wed May  8 09:30:21 2002
> *********************************************************************
> 
> Checking file(s) in /local/apps/openssh/3.1p1/conf/ssh_host_key.pub
> Checking file(s) in /local/apps/openssh/3.1p1/conf/ssh_host_dsa_key.pub
> Checking file(s) in /usr/local/qftest
> cf:baitmaster: Cannot access file/directory /usr/local/qftest
> cf:baitmaster: /usr/local/qftest had permission 700, changed it to 0
> cf:baitmaster: Creating file /usr/local/qftest, mode = 755
> Checking file(s) in /usr/local/j2re1.4.0
> Saving the setuid log in /var/cfengine/cfagent..log
> Job start time set to Wed May  8 09:30:21 2002
> 
> 
> *********************************************************************
>  Main Tree Sched: shellcommands pass 1 @ Wed May  8 09:30:21 2002
> *********************************************************************
> 
> cf:baitmaster: Executing script /usr/bin/rm -rf
> /usr/local/qftest...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cf:baitmaster: Finished script /usr/bin/rm -rf /usr/local/qftest
> cf:baitmaster: Executing script /usr/bin/gzip -dc
> /mnt/baitblaster/Solaris_8/pkgs/qftest-0.96.0.tar.gz | ( cd /usr/local ;
> /usr/bin/tar xf - )...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cf:baitmaster: Finished script /usr/bin/gzip -dc
> /mnt/baitblaster/Solaris_8/pkgs/qftest-0.96.0.tar.gz | ( cd /usr/local ;
> /usr/bin/tar xf - )
> cf:baitmaster: Executing script /usr/bin/cp
> /mnt/baitblaster/Solaris_8/pkgs/qftest_license
> /usr/local/qftest/license...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 22)
> cf:baitmaster: Finished script /usr/bin/cp
> /mnt/baitblaster/Solaris_8/pkgs/qftest_license /usr/local/qftest/license
> Job start time set to Wed May  8 09:30:29 2002
> 
> ===========================
> The problem with directories class definition used pretty much same
> setup except that I had
>     /usr/local/qftest define=Installqftest
>     /usr/local/j2re1.4.0 define=InstallJRE
> 
> in directories section.
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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