+++ This bug was initially created as a clone of Bug #495680 +++
>> Under %post section of RHEL5 installation haldaemon and messagebus service is stopped.
Later after reboot these services are running. But under %post they are stopped.
If we add commands to start (/etc/init.d/messagebus start;/etc/init.d/haldaemon start) it in %post then they get started. But they are not running by default.
rhnreg_ks has the below code which fetches the information and decides whether the system is fully virt or para virt or a physical host system
..snip ..
bus = dbus.SystemBus()
device_obj = \
bus.get_object('org.freedesktop.Hal',
'/org/freedesktop/Hal/devices/computer')
device = dbus.Interface(device_obj, 'org.freedesktop.Hal.Device')
vendor = device.GetPropertyString('smbios.bios.vendor')
..snip ..
As messagebus and haldaemon are stopped in post , rhnreg_ks is unable to get the required information and hence the system is treated as a host system.
I switched the code which are required for run of rhnreg_ks to use python-dmidecode and use the data from dmidecode. It does work even without hald and dbus.
Commits:
975651d53abbe77b402e0d25e03ecb4c81a40ca9
3f7cb87a0956eb3ad433b709bb753fffd990beea
Note: there may be also some other queries which may be flipped from hal to smbios, but I do not see reasons for such task right now.