[Spacewalk-list] Kickstart generated with syntax error - an extra %end TAG

MAC IT Solutions info at macitsolutions.ch
Mon Oct 14 17:01:33 UTC 2013


Dear all

I'm new to spacewalk, and I'm experimenting with kickstarts. However I 
faced this strange issue: when I create a kickstart profile the 
resulting script has a syntax error (in the attached on is at line 55, 
and extra %end tag right after the line

# Error: no snippet data for spacewalk/post_reactivation_key

I was wondering about the error: I had a look to the default snippets, 
it exists and contains data. I pasted the generated kickstart file at 
the end of this message - I obviously removed the confidential values

As I told you I'm new to spacewalk, … do you think I have missed 
something during cobbler setup or during the profile creation?

I'm using spacewalk 2.0.1-1 on CentOS 6.4

I hope that someone could help me

thanks

Marco

# Kickstart config file generated by Spacewalk Config Management
# Profile Label : ks-centos64-x86_64
# Date Created : 2013-10-14 00:36:56.977818

install
text
network --bootproto dhcp
url --url http://spacewalk.macitsolutions.local/ks/dist/centos64-x86_64
lang en_US
keyboard us
zerombr
clearpart --all
bootloader --location mbr
timezone America/New_York
auth --enablemd5 --enableshadow
rootpw --iscrypted $1$IIremoveditforsecurity.
selinux --permissive
reboot
firewall --disabled
skipx
part /boot --fstype=ext3 --size=200
part pv.01 --size=1000 --grow
part swap --size=1000 --maxsize=2000
volgroup myvg pv.01
logvol / --vgname=myvg --name=rootvol --size=1000 --grow

%packages
@ Base
%end

%pre

wget 
"http://spacewalk.macitsolutions.local/cblr/svc/op/trig/mode/pre/profile/ks-centos64-x86_64:2:MACITSolutions" 
-O /dev/null



# Error: no snippet data for spacewalk/keep_system_id

%end

%post --nochroot
mkdir /mnt/sysimage/tmp/ks-tree-copy
if [ -d /oldtmp/ks-tree-shadow ]; then
cp -fa /oldtmp/ks-tree-shadow/* /mnt/sysimage/tmp/ks-tree-copy
elif [ -d /tmp/ks-tree-shadow ]; then
cp -fa /tmp/ks-tree-shadow/* /mnt/sysimage/tmp/ks-tree-copy
fi
cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
cp -f /tmp/ks-pre.log* /mnt/sysimage/root/ || :

%end

# Error: no snippet data for spacewalk/post_reactivation_key

%end

%post --log /root/ks-rhn-post.log
# --Begin Spacewalk command section--
cat > /tmp/ssl-key-1 <<'EOF'
Certificate:
.. I removed certificate data
EOF
# ssl-key1
cat /tmp/ssl-key-* > /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
perl -pe 's/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g' -i 
/etc/sysconfig/rhn/up2date

mkdir -p /tmp/rhn_rpms/optional
cd /tmp/rhn_rpms/optional
wget -P /tmp/rhn_rpms/optional 
http://spacewalk.macitsolutions.local/download/package/3c25714bde43a485503deafdda0592283d6f65de/0/2/5830/pyOpenSSL-0.10-2.el6.x86_64.rpm 
http://spacewalk.macitsolutions.local/download/package/d3df5b526e0f1a24aea6ee10648ba337d0bb91d8/0/2/17553/rhnlib-2.5.65-1.el6.noarch.rpm 
http://spacewalk.macitsolutions.local/download/package/b18f837070057237d916011fc85f94be9e8b7ea3/0/2/6755/libxml2-python-2.7.6-12.el6_4.1.x86_64.rpm 

rpm -Uvh --replacepkgs --replacefiles /tmp/rhn_rpms/optional/pyOpenSSL* 
/tmp/rhn_rpms/optional/rhnlib* /tmp/rhn_rpms/optional/libxml2-python*
perl -npe 
's|^(\s*(noSSLS\|s)erverURL\s*=\s*[^:]+://)[^/]*/|${1}spacewalk.macitsolutions.local/|' 
-i /etc/sysconfig/rhn/up2date

# now copy from the ks-tree we saved in the non-chroot checkout
cp -fav /tmp/ks-tree-copy/* /
rm -Rf /tmp/ks-tree-copy
# --End Spacewalk command section--

# begin cobbler snippet
# Error: no snippet data for spacewalk/default_motd

# Error: no snippet data for spacewalk/redhat_register

# end cobbler snippet

rhn_check

# Start post_install_network_config generated code
# End post_install_network_config generated code

%end


%post


# Start koan environment setup
echo "export COBBLER_SERVER=spacewalk.macitsolutions.local" > 
/etc/profile.d/cobbler.sh
echo "setenv COBBLER_SERVER spacewalk.macitsolutions.local" > 
/etc/profile.d/cobbler.csh
# End koan environment setup



wget 
"http://spacewalk.macitsolutions.local/cblr/svc/op/ks/profile/ks-centos64-x86_64:2:MACITSolutions" 
-O /root/cobbler.ks
wget 
"http://spacewalk.macitsolutions.local/cblr/svc/op/trig/mode/post/profile/ks-centos64-x86_64:2:MACITSolutions" 
-O /dev/null
%end




More information about the Spacewalk-list mailing list