Fedora Linux Support Community & Resources Center
  #1  
Old 15th June 2012, 10:23 AM
JakeR Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
macoschrome
Several kickstart -% post priority

I have a kickstart which includes several other ks files. One of them is /usr/share/spin-kickstart/fedora-live-desktop.ks.

The fedora-live-desktop.ks %post creates some files that I need to modify.

How to determine the order of %post in all the included ks files? I can not get my %post script to run after fedora-live-desktop.ks.
Reply With Quote
  #2  
Old 16th June 2012, 03:44 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 888
linuxfirefox
Re: Several kickstart -% post priority

Hi JakeR,

That is a good question, Normally the %post sections from the %include are run first. But when a .ks that is called by %include calls another .ks with %include the second included %post runs first.

So if you want a %post section to be run last it is usually safe to add that %post section to the .ks you are calling with livecd-creator.

You can add a line to all the .ks's at the beginning of the %post sections that will show you during the build when they are ran by adding a line like this for live-base:
Code:
%post
echo "**************This is the beginning of the post section of live-base*********************"
or for fedora-live-desktop:
Code:
%post
echo "***************This is the beginning of the post section of fedora-live-desktop***************"

Hope this helps,
Reply With Quote
  #3  
Old 16th June 2012, 10:38 PM
JakeR Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
macoschrome
Re: Several kickstart -% post priority

Quote:
Originally Posted by AndrewSerk View Post
Hi JakeR,

That is a good question, Normally the %post sections from the %include are run first. But when a .ks that is called by %include calls another .ks with %include the second included %post runs first.

So if you want a %post section to be run last it is usually safe to add that %post section to the .ks you are calling with livecd-creator.
Hi

Thank you. I want to override (rm files) in the corresponding .ks file. In my example, I want to run foobar-live-desktop.ks %post after fedora-live-desktop.ks %post.

Code:
# foobar-livecd-desktop.ks
%include foobar-live-base.ks
%include /usr/share/spin-kickstarts/fedora-livecd-desktop.ks
%include foobar-live-desktop.ks
[...]
Code:
# foobar-live-desktop.ks
%include foobar-live-base.ks
%include /usr/share/spin-kickstarts/fedora-live-desktop.ks
[...]
This "include structure" is logical (one foobar*.ks per fedora*.ks), but fedora-live-desktop.ks will be included twice (directly by foobar-live-desktop.ks and indirectly by foobar-livecd-desktop.ks). Is it a problem?

I can't call foobar-livecd-desktop.ks and get the %post in foobar-live-desktop.ks to run after %post in fedora-live-desktop.ks?
Reply With Quote
  #4  
Old 18th June 2012, 03:35 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 888
linuxfirefox
Re: Several kickstart -% post priority

Hi JakeR,

You could add a second %post to the end of all the fedora*.ks with the corresponding foobar*.ks %post contents in the second %post and not run any separate foobar*.ks. That would eliminate the issue you are seeing with regards to the called order.

If for some reason this is not a acceptable method I would suggest you present this question to the livecd mailing list as that would be the most likely place to get a different working answer. : https://lists.fedoraproject.org/mailman/listinfo/livecd

Hope this helps,

EDIT: If you ask this question on the mailing list and get a answer, please post back your findings for future reference. Thanks in advance

Last edited by AndrewSerk; 18th June 2012 at 04:38 PM.
Reply With Quote
Reply

Tags
kickstart, post, priority

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kickstart %post install Script Help slops Using Fedora 2 5th December 2008 11:30 AM
nfs fails in fc7 kickstart %post script buhl260 Installation and Live Media 1 10th July 2007 01:34 PM
Kickstart %post jackel Installation and Live Media 1 10th August 2006 01:56 AM
Kickstart Post option? aussieoc Servers & Networking 1 2nd June 2006 01:07 AM


Current GMT-time: 09:21 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat