On 09/06/2011 05:14 PM, [email protected] wrote:
> Forum: CFEngine Help
> Subject: Call bash commands in cfengine
> Author: jimmiez
> Link to topic: https://cfengine.com/forum/read.php?3,23374,23374#msg-23374
>
> Hi cfegineers,
>
> I added some global env variables in /etc/profile and tried to call "source
> /etc/profile" to apply the change immediately. But it cfengine reported:
> 'Proposed executable file "source" doesn't exist'. Anyone know how to make it
> work in cfengine? Or any better way to set global env values?
>
> Below is part of my code that didn't work:
>
> ...
> bundle agent set_profile
> {
> commands:
> "source /etc/profile"
> contain => in_shell_and_silent;
> }
source is a shell builtin you might be able to run it like this
commands:
"/bin/bash -c 'source /etc/profile'"
--
Nick Anderson <[email protected]>
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine