Service discovery and RPM manipulation in C++
Hi,
I know it is pretty simple to work out the services in the Linux box using a shell script (chkconfig --list) and easy to work out what package provides a service (rpm -qf /etc/init.d/servicename).
However, I am developing a C++ api to provide various attributes of a service and rpm packages.
For example, I have to provide information on the run levels a service starts, the services (facilities) that a service depend on and so on.
Similarly, I have to provide information on an installed rpm, almost all the information you get when you issue rpm -qi.
Is there a standard C++ way to do this? Or should it be done using the standard chkconfig and rpm -q?
Please let me know of the question is vague or you need more information in this regard.
Thanks
|