[Spacewalk-list] Clone a parent channel and make it a child

Michael Mraka michael.mraka at redhat.com
Tue Sep 30 08:54:19 UTC 2014


Glen Collins wrote:
% Ok. I don't know why I can't get it correct but for whatever reason I don't think this script can do it. But I used "spacecmd" and I was able to successfully create the child channel within the blank parent as I described below....BUT! For the life of me I cannot figure out how to use "spacecmd" in non-interactive mode. Does anyone have a sample they could pass along using spacecmd in no-interactive mode? 

Try

$ spacecmd -u user -p password -q softwarechannel_clone <<EOF
oracle-linux-6-x86_64
tuesday-oracle-linux-6-x86_64
tuesday-oracle-linux-6-x86_64
oracle-base-channel 
n


y
EOF

% [root at xxxxxx bin]# spacecmd 
% Welcome to spacecmd, a command-line interface to Spacewalk. 
% 
% Type: 'help' for a list of commands 
% 'help <cmd>' for command-specific help 
% 'quit' to quit 
% 
% INFO: Connected to https://localhost/rpc/api as admin 
% spacecmd {SSM:0}> softwarechannel_clone 
% Source Channels: 
% oracle-base-channel 
% oracle-linux-6-x86_64 
% Select source channel: oracle-linux-6-x86_64 
% Channel Name: tuesday-oracle-linux-6-x86_64 
% Channel Label: tuesday-oracle-linux-6-x86_64 
% Base Channels: 
% oracle-base-channel 
% oracle-linux-6-x86_64 
% Select Parent [blank to create a base channel]: oracle-base-channel 
% Copy source channel GPG details? [y/N]: n 
% GPG URL: 
% GPG ID: 
% GPG Fingerprint: 
% Original State (No Errata) [y/N]: y 
% 
% 
% All the highlighted entries is what I need to feed to spacecmd. I know a while ago a patch was added to allow for non-interactive input but I think that was for new channel only and not a clone. 
% 
% If anyone can assist it would be helpful! 
% 
% Thanks 
% 
% Glen Collins 
% 

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list