Forum: CFEngine Help
Subject: Motd generation
Author: crd
Link to topic: https://cfengine.com/forum/read.php?3,23623,23623#msg-23623

Hello,

I'm trying to generate an motd which has the output from uname on the first 
line, then static text from a template from there onwards.

At the moment I'm going down the path of having a template file containing 2 
variables [ $(uname_output) and $(static_message) ] and having cfengine expand 
the variables. I can use the readfile() function to get the contents of the 
static file into a variable, but I can't find a way to run uname and capture 
the output into a variable.

Is there a way to do this? Or better still is there a more standard way to do 
this? 

I get the feeling I'm abusing the cfengine architecture with this method.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to