LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-23-2014, 09:13 AM   #1
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 250

Rep: Reputation: 31
Kickstart post install script


I am trying to set up an unattended install via PXE and kickstart. The basic install is working fine but it is the %post that is giving me fits. It seems that all the commands are just echo'ed to the log and not really executed. At least no errors are output for the commands which either do not run or fail. This is the trivial %post section I am using to test:
Code:
%post --log=/root/post_install.log
echo $PATH
which useradd
%end
The log shows the 'echo' command with $PATH expanded but not echo'ed and the 'which' command with no output. What am I doing wrong? TIA.

Last edited by gw1500se; 12-24-2014 at 06:54 AM.
 
Old 12-26-2014, 04:49 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
No idea what went wrong but RPM scripts use /bin/sh so you could try trace things?:
Code:
%post --log=/root/post_install.log
set -vx
echo $PATH
which useradd
%end
 
Old 12-26-2014, 05:46 PM   #3
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
I tried to find a problem with this yesterday and couldn't. The logging setting is correct.

Can you post the entirety of the log?
 
Old 12-27-2014, 03:52 PM   #4
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 250

Original Poster
Rep: Reputation: 31
It turned out to be a misplaced quote. Argghhhhh! Thanks to all those who tried to help but I guess you just can't fix stupid.
 
Old 12-27-2014, 04:37 PM   #5
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
Next time, if you post the entirety of the file, we might catch it faster...

Please mark the thread as solved.
 
  


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
run .sh script using %post in kickstart file sachin.davra Linux - Newbie 1 01-15-2014 07:44 AM
[SOLVED] kickstart %post script help tripialos Linux - Newbie 2 08-20-2013 07:34 AM
Handling Kickstart post-install script GUI adrianmarsh Red Hat 4 08-10-2009 09:37 PM
Post script in kickstart qiuzhihong Linux - Software 1 04-19-2008 03:52 AM
running %post script for Mailserver through kickstart abhi2778 Fedora 0 09-06-2006 03:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:35 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