In a presentation from 2010 RedHat Summit, I saw Satellite registration (rhnreg_ks
) done in a %pre
stanza, while RedHat's current docs (as well as this answer) do it in %post
. Registering in %post
worked for me, but then I have to run yum install
there to get packages from child channels, instead of keeping everything in %packages
.
Trying to replicate the code for registering in %pre
from that presentation (see pages 149-153) fails with no errors reported (even with --erroronfail
) or pre-logs generated -- but the host is definitely not subscribed because the packages from the activation's child channel are reported missing during the %packages
phase.
Has anyone succeeded in this?