Service discovery and RPM manipulation in C++

view story

http://www.linuxquestions.org – 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 (HowTos)