LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 06: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, 05: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, 09: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



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 12:06 PM
[SOLVED] Question about kickstart %post section theillien Linux - Newbie 6 07-25-2011 03:28 PM
advanced kickstart - Displaying GUI stuff from the %post section johnnymta Linux - Server 1 10-01-2009 04:44 AM
%post section of Fedora8 kickstart install doesn't run scott.anderson Fedora - Installation 2 07-31-2008 08:41 AM
problem with kickstart post section Hairman Red Hat 2 05-14-2007 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:13 PM.

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
Open Source Consulting | Domain Registration