On Wednesday 22 April 2015 08.37:56 Marco van Wieringen wrote:
> Bruno Friedmann <friedmann.bruno <at> gmail.com> writes:
>
> >
> > I've a doubt and don't find what's wrong inside my definition
> >
> > In jobs I've those instruction
> >
> > # Create a lvm dump of configuration
> > RunScript {
> > RunsWhen = Before
> > RunsOnClient = Yes
> > FailJobOnError = No
> > Command = "/sbin/lvmdump -m"
> > }
> >
> > # Remove the configuration dump
> > RunScript {
> > RunsWhen = After
> > RunsOnClient = Yes
> > FailJobOnError = No
> > Command = "/usr/bin/rm -f /root/lvmdump-*.tgz"
> > }
> >
>
> >
> > But unfortunately, the *.tgz are still there after.
> >
> > Can a fresh pair of eyes point me what's I've done wrong ?
> You fell into the known pitfall that every external program run
> by Bacula and Bareos is done using execvp() so your shell expansion
> will never happen as execvp() willo just execute the rm command
> with as arguments -f /root/lvmdump-*.tgz
>
> So you have two options:
>
> - wrap things in a shell script and run that.
> - Use the following construct: sh -c '/usr/bin/rm -f /root/lvmdump-*.tgz'
>
>
Raah shame on me, I've not able to see the missing sh -c
pfuuu ...
Thanks Marco ...
--
Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch
openSUSE Member & Board, fsfe fellowship
GPG KEY : D5C9B751C4653227
irc: tigerfoot
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.