Hello everyone,
I've been working on a script that generates a kickstart file for RHEL 6.3. Everything seems to work correctly except for an issue with the %post ..... %end section. It seems that if I have a section that’s utilizes cat and EOF it ignores the EOF. Please see the example below.
Code:
%post
cat << EOF >> /etc/passwd
user1:x:1000:1000::/home/user1:/bin/bash
......................
......................
......................
EOF
cat << EOF >> /etc/shadow
user1:fsdfsdf#@$$@324fdsfsgs1233:15658:0:99999:7:::
......................
......................
......................
EOF
......................
......................
......................
%end
What I would expect to happen would be that the above would be appended to passwd and shadow. However, what I end up with is all of the above including the ending EOFs in passwd. I'm not clear as to why this is occurring. I've tested the above script in a bash script run on a local machine without issue.
Any direction would be much appreciated.