From: Pat O'B. <obr...@gm...> - 2011-05-19 17:44:05
|
I would do this: <config> <pre> <exec>your command here</exec> </pre> ... </config> Does that work? -pat On Thu, May 19, 2011 at 4:48 AM, Gareth Greener <gar...@gm...>wrote: > Hi there, > > I am in the process of moving from cfengine to etch but hitting a little > snag. > I noticed that the dependcommand is not allowed by default, so I edited the > config.dtd to allow it, following the same syntax as depend. > > I have also created the relevant files and folders under commands for cpio > to be installed. > > The problem I am having is that there are files that exist on my clients, > however the cpio command is not installed so I am calling it with the > <dependcommand> tags, but etch seems to ignore that if the file already > exists on the client. > > > Config.xml > ---------------- > <config> > <dependcommand>cpio</dependcommand> > <file> > <perms>644</perms> > <source> > <script>scriptfile.script</script> > </source> > </file> > <post> > <exec>/etc/init.d/ssh restart</exec> > </post> > </config> > > > Commands.xml > ----------------------- > <commands> > <step> > <guard> > <exec>test -f /bin/cpio</exec> > </guard> > <command> > <exec>apt-get update && apt-get -qq install cpio</exec> > </command> > </step> > </commands> > > > And I get the following error: > > Saving temporary copy of original file: /etc/ssh/sshd_config -> > /var/etch/orig/etc/ssh/sshd_config.TMP > sh: cpio: not found > Recursive copy /etc/ssh/sshd_config to > /var/etch/orig/etc/ssh/sshd_config.TMP20110519-7810-ckicl4-0 failed > > ------------------------------- > Thanks for your time. > > Gareth > > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > etch-users mailing list > etc...@li... > https://lists.sourceforge.net/lists/listinfo/etch-users > > |