LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 11-20-2012, 07:04 PM   #1
FatKang
LQ Newbie
 
Registered: Nov 2012
Distribution: Linux Mint 13
Posts: 4

Rep: Reputation: Disabled
Question Trouble with kickstart file's post script section


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.
 
Old 11-21-2012, 06:22 AM   #2
kankan55
Member
 
Registered: Nov 2012
Posts: 32

Rep: Reputation: Disabled
could you try this

cat >> myfile << EOF
my text
EOF

Kan
 
1 members found this post helpful.
Old 11-30-2012, 10:41 AM   #3
FatKang
LQ Newbie
 
Registered: Nov 2012
Distribution: Linux Mint 13
Posts: 4

Original Poster
Rep: Reputation: Disabled
Cool,

That did the trick.... guess it helps if I flow things in the right direction! ;p

- FatKang
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kickstart Script can i create a file in %pre and %include it in the command section? Rogue45 Linux - Newbie 2 07-25-2012 01:06 PM
[SOLVED] Question about kickstart %post section theillien Linux - Newbie 6 07-25-2011 04:28 PM
advanced kickstart - Displaying GUI stuff from the %post section johnnymta Linux - Server 1 10-01-2009 05:44 AM
%post section of Fedora8 kickstart install doesn't run scott.anderson Fedora - Installation 2 07-31-2008 09:41 AM
problem with kickstart post section Hairman Red Hat 2 05-14-2007 02:35 PM


All times are GMT -5. The time now is 07:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration