LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-25-2011, 02:08 PM   #1
theillien
Member
 
Registered: Jan 2004
Posts: 107

Rep: Reputation: 1
Question about kickstart %post section


I'm able to install servers using kickstart, but I need to run scripts after the fact. I'm aware that the %post section is provided for this. However, I need the script to be in a central location and copied to the new server. This way, when changes to the script are made, I don't have to update several kickstart files to reflect it.

I'm confused about copying files, though. Where do they need to be? The installation is running from NFS. Can I just place the file somewhere there, mount the NFS share on the new server and copy directly? If I place the script in the installation media directory is it available already? Does I have to use --no-chroot for the %post section in order to copy the file?

Any clarification on this would be much appreciated.
 
Old 07-25-2011, 02:41 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Quote:
Originally Posted by theillien View Post
I'm able to install servers using kickstart, but I need to run scripts after the fact. I'm aware that the %post section is provided for this. However, I need the script to be in a central location and copied to the new server. This way, when changes to the script are made, I don't have to update several kickstart files to reflect it.

I'm confused about copying files, though. Where do they need to be? The installation is running from NFS. Can I just place the file somewhere there, mount the NFS share on the new server and copy directly?
Yup, that would work. Or, rather than copying it, just execute it from
the remote location.

Quote:
Originally Posted by theillien View Post
If I place the script in the installation media directory is it available already?
That would work, too.

Quote:
Originally Posted by theillien View Post
Does I have to use --no-chroot for the %post section in order to copy the file?
Umm ... I don't think you do - we certainly don't use --no-chroot.


Cheers,
Tink
 
Old 07-25-2011, 02:49 PM   #3
theillien
Member
 
Registered: Jan 2004
Posts: 107

Original Poster
Rep: Reputation: 1
How would I execute it remotely?

I can't believe I said "Does I..." /facepalm
 
Old 07-25-2011, 03:25 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Ok, so not "remotely" ... just invoke it off the nfs share, no
need to copy it across (unless you mounted it noexec).
 
Old 07-25-2011, 03:34 PM   #5
theillien
Member
 
Registered: Jan 2004
Posts: 107

Original Poster
Rep: Reputation: 1
I found this from the RHEL 4 docs:

Quote:
mkdir /mnt/temp
mount -o nolock 10.10.0.2:/usr/new-machines /mnt/temp
open -s -w -- /mnt/temp/runme
umount /mnt/temp
But adding it to my kickstart file (after modifying it to represent my own configuration, of course ) it didn't run. Do errors from kickstart show up in any logs I can look at to figure out what went wrong?
 
Old 07-25-2011, 04:25 PM   #6
theillien
Member
 
Registered: Jan 2004
Posts: 107

Original Poster
Rep: Reputation: 1
Nevermind. Script wasn't written correctly. It works now.
 
Old 07-25-2011, 04:28 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Well do :}

Want to mark your thread as resolved?

Last edited by Tinkster; 07-25-2011 at 04:29 PM.
 
  


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
advanced kickstart - Displaying GUI stuff from the %post section johnnymta Linux - Server 1 10-01-2009 05:44 AM
kickstart - asking for configuration in the %pre section johnnymta Linux - Server 7 08-18-2009 04:22 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
Using parted in the pre section of my kickstart install davidr Linux - Software 0 12-09-2004 07:53 PM


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

Main Menu
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