[Home]

Summary:ASTERISK-03410: [patch] #exec (an SSI like directive)
Reporter:Anthony Minessale (anthm)Labels:
Date Opened:2005-02-01 09:45:54.000-0600Date Closed:2005-02-06 21:35:15.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) config_exec_rev0.diff
( 1) config_exec_rev1.diff
Description:This patch implements the #exec directive in the ast_load file parser.  This permits you to run an executable dynamicly during reload.  The output is expected to be any legal asterisk config formated data.  The resulting output is included as if it were a #include and then destroyed.


****** ADDITIONAL INFORMATION ******

Disclaimer on file.
anthmct@yahoo.com
Comments:By: Andrey S Pankov (casper) 2005-02-01 10:30:17.000-0600

"Directive '#exec' needs an argument (path)"...

Why _path_? I understand this should be smth like "filename with full path to it", but _path_ without filename is not enough.

By: Mark Spencer (markster) 2005-02-01 11:17:15.000-0600

Since this gives config file access to execute commands, I think there should be a global option to enable/disable (default obviously being disabled).  What do you think?

By: Anthony Minessale (anthm) 2005-02-01 11:59:49.000-0600

Good idea,

command line... -e
or in asterisk.conf:
[options]
exec_includes => true ; default false

also changed it to warn
'#exec' needs an argument (/path/to/executable)

For those lucky few of us that don't know a what a path is but were somehow able to run unix and compile and patch asterisk.

By: Mark Spencer (markster) 2005-02-01 13:26:30.000-0600

Okay need to update the man page, too!

By: Mark Spencer (markster) 2005-02-01 13:26:54.000-0600

(or remove it from the command line, and just have it from asterisk.conf, either way -- does this really belong on the command line anyway?)

By: Anthony Minessale (anthm) 2005-02-01 14:01:47.000-0600

markster,

I'll let you pick! I'm not sure I just did it like all the other global_options for consistancy sake.  I was afraid having a global option in the file that was not also a flag would break the unwritten rules.

If you do want the man page edited where is that file exactly I'm not sure which one you mean? but it should probably be documented there that asterisk.conf can control all the defaults of command line options too which is bet is a little-known fact.


Look for me on IRC, i'm there chatting with your walloping bot!

By: Mark Spencer (markster) 2005-02-01 21:40:01.000-0600

Added to CVS with the following changes:

1) Initializing variables that have no path for being used before being initialized elsewise is pointless.

2) Removed command line option

3) Tried to cleanup code so that #exec followed by #include would do the right thing (not try to unlink the file twice, etc.)

Thanks!

By: Russell Bryant (russell) 2005-02-06 21:35:15.000-0600

not in 1.0