The documentation says that anaconda will ignore comments. Instead, it actually strips them from the file including from the %post section. This breaks post scripts such as cat <<EOF >/etc/init.d/service #!/bin/sh # # chkconfig: - 95 10 # description: local startup script # do something... EOF This can be worked around with something like sed -n 's/^-- //p' <<EOF >/etc/init.d/service -- #!/bin/sh -- # -- # chkconfig: - 95 10 -- # description: local startup script -- # -- do something... EOF But that is a bit of a pain, when just passing the comments would make life a lot easier.
Fixed in CVS. Left blank lines in as well.
this failed in test w/the qa1212.1 tree: lang en_US network --bootproto dhcp nfs --server porkchop --dir /mnt/redhat/test/qa1212.1/i386 keyboard "us" zerombr yes clearpart --all part / --size 2000 --asprimary part swap --size 256 --asprimary install mouse genericps/2 timezone America/New_York xconfig rootpw xxxxxxxx auth --useshadow --enablemd5 lilo --location mbr --append "mem=60m" %packages @Base @X Window System %post cat <<EOF >/tmp/foo.test #!/bin/sh # # chkconfig: - 95 10 # description: local startup script # echo "foo.test" EOF fails with a traceback: Traceback (innermost last): File "/usr/bin/anaconda", line 346, File "/usr/lib/anaconda/kickstart.py", line 605, File "/usr/lib/anaconda/kickstart.py", line 566, File "/usr/lib/anaconda/kickstart.py", line 391, in readKickstart if args[0]=="%post" or args[0]=="%pre": IndexError: list index out of range
Should be fixed according to ewt.
verified fix in qa0110.0 test tree ...
*** Bug 47343 has been marked as a duplicate of this bug. ***
No no no.. Not a dupe, 18810, not 18110.. duh.. sorry.