0

We have a (spacewalk) rhn satellite server running and several hundred machines registered with it with a few activation keys. Each of these keys have one or more child channels. We need to know how to 'refresh' the registration so that the clients can have any new child channels that we add to that base activation key to be available to each of the clients. We would like to be able to write a script that will check the 'currentness' of its registration automatically on a regular basis, but can't work out how to do it without re-registering the machine which would leave too many defunct profiles on the server side. Any suggestions or help would be appreciated.

Mawk044
  • 11
  • 1

2 Answers2

0

The only way I have managed to do this is to select the servers throught the SSM in the gui and re-assign the channels through there rather than in a script

Mawk044
  • 11
  • 1
0

This is an old question that may need a fresh answer.

Learn about spacecmd -- it'll save your brain and mouse-clickety hand some needless pain. AND, it can be scripted, even if it's a bit wordy.

for CHNL in `spacecmd -q -- softwarechannel_list`; do
  spacecmd -q -- \
    softwarechannel_listchildchannels ${CHNL} \
  | xargs -n1 \
    spacecmd -q -y -- \
    system_addchildchannels channel:${CHNL}
done

Throw a shebang header in, and drop it into spacewalk's /etc/cron.daily . If you're doing things somewhat-properly, this is the easiest chef recipe out there ;-) Once you realize why that's only mostly-proper, it's the easiest RPM payload.

user2066657
  • 336
  • 2
  • 13