Perl libraries to manipulate config.xml file?
-
Hello everyone, I'm new to pfsense. I need to write a perl script to perform Create/Read/Update/Delete operations on the firewall rules in the config.xml file. I have found a file called config.inc in the /etc/inc/ directory that claims to have functions for the above operations, but it is in PHP. Are there any other libraries or other ways to accomplish this task?
Thanks. :)
-
No, only php libs.
-
If you are dead-set on perl you could port that library to perl if you really wanted to, but that seems like a lot of work for very little benefit and potentially a way to introduce errors and corrupt the configuration.
Perl doesn't ship with pfSense, though several packages install it. I believe that only PHP and Lua are shipped with pfSense, and only PHP is used when working with most aspects of the system.
-
I believe that only PHP and Lua are shipped with pfSense, and only PHP is used when working with most aspects of the system.
Can i see Lua in pfSense (examples exists)?
-
I think it's only used during the install process. The install scripts are done with Lua.
After install, the binary is lua50. I thought there was a symlink for lua -> lua50 but I don't see it now.
-
Thanks!
-
Thank You very much everyone. I guess I'll write the perl modules myself.