Just curious.
In an actions conf file there is "parameter" field using %s as passed in argument, which comes from the parameter box in cron section of webgui.
Does the webgui form field represent %s as a whole? In other words, if cron form parameter field is "-s -l a.b.c.d", does that get passed in as single argument %s, or would my actions file need %s %t %z for three arguments?
"%s" most probably is a printf(3) format indicating that the next parameter is a string. But I am not 100% sure in this particular context.
Quote from: Patrick M. Hausen on September 24, 2025, 08:24:43 PM"%s" most probably is a printf(3) format indicating that the next parameter is a string. But I am not 100% sure in this particular context.
I suspect you are right. Lots of py on OPNsense, and %s in py is string.
Perhaps the wording is off for me, singular "parameter" is used. Perhaps webgui should say "Parameters".
I think the code expands on whitespaces which isn't ideal if somebody would add a multi-line script or input that is quoted.
Eventually something more clever has to be done, but so far the only issue we've had over the years was the mistreatment of "-a" parameter input as an option to configctl which was fixed in 25.1.11 specifically for cron GUI use.
Cheers,
Franco