Colin Coe wrote:
I've only been coding in Python for a week or two now so I didn't know
iniparse existed. Having looked though, it seems iniparse doesn't
exist on RHEL4 (please correct me if I'm wrong). RHEL4 is one of the
Indeed. I will leave it as is then...
platforms that this script is needed for. Is there a cleaner way to
get the system ID and Satellite/Spacewalk server that will work on
RHEL4?
import config
cfg = config.initUp2dateConfig()
#this will get you systemid path
cfg['systemIdPath']
#this will give you serverURL from config
cfg['serverURL']
You may as wall make successor of up2date_client/rhncli.py which do a
lot of things for you.
You may check client/rhel/rhn-client-tools where you find a lot of
useful libraries.
Also you may want to use OptionParser rather then getopt. Check:
client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
for example
Also, can you advise in which RPM this script is likely to be put? I
ask because it is designed to work with nodes not using Spacewalk or
Satellite as well as those that are using Spacewalk or Satellite
servers.
spacewalk-utils
Commited as 5a787bbfcdca363df858fbcfe10762e59fb4a175
Can I ask you to write man page for this script as well?
You can take utils/*.sgml as example.
--
Miroslav Suchy
Red Hat Satellite Engineering
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel