CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  %include in kickstart

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  jnojr
      jnojr
%include in kickstart
#1
Regular Board Member
Joined: 2007/11/29
From Reston, VA
Posts: 54
RHEL 5.4

I'm trying to use %include statements in my kickstarts, and am running into some problems.

In %pre, I can %include /mnt/source/isolinux/setup-questions and that works just fine. One of the things it does is echo out several variables to /tmp/vars In %post --nochroot, I copy /tmp/vars to /mnt/sysimage/tmp/vars so I can access /tmp/vars in %post That works just fine.

The problem is when I try to include files I've copied to /tmp In %pre, I can copy my include files to /tmp/ks-files/, and I've verified that they are, indeed, copied. The files exist, are readable, have the correct content. But if, in %pre, I %include /tmp/ks-files/setup-questions, kickstart simple sails right on past. In %post, again, I can drop to a shell and see that /tmp/ks-files/* are all there, but the first %include bombs out with an error about the file not existing.

What's the secret to getting this to work?
Posted on: 2012/4/17 13:03
Create PDF from Post Print
Top
  •  vanecka
      vanecka
Re: %include in kickstart
#2
Jr Board Member
Joined: 2010/1/28
From University of the Free State - South Africa
Posts: 27
Hi jnojr,

I think that the %include tags are interpreted before the initialisation of the chroot environment, that is used inside the %pre and %post sections. This means that the paths of the files should be the paths on the "server" and not the path on the host where it is being installed. Or you should use a web URL of the "text" files to include.
Posted on: 2012/4/17 20:48
Create PDF from Post Print
Top
  •  jnojr
      jnojr
Re: %include in kickstart
#3
Regular Board Member
Joined: 2007/11/29
From Reston, VA
Posts: 54
Quote:

vanecka wrote:
Hi jnojr,

I think that the %include tags are interpreted before the initialisation of the chroot environment, that is used inside the %pre and %post sections. This means that the paths of the files should be the paths on the "server" and not the path on the host where it is being installed. Or you should use a web URL of the "text" files to include.


I do believe they are parsed before the kickstart is actually run.

But that doesn't help me to understand why they the %include lines will not see files which do exist and are readable. I can %include a file on the DVD in %pre, before there is a filesystem to chroot to, but if I copy the file to /tmp (which is a ramdisk, but that shouldn't really matter) it can no longer be "seen", and the kickstart bombs out.
Posted on: 2012/4/25 16:25
Create PDF from Post Print
Top
  •  jnojr
      jnojr
Re: %include in kickstart
#4
Regular Board Member
Joined: 2007/11/29
From Reston, VA
Posts: 54
Anyone?
Posted on: 2012/5/3 16:51
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: %include in kickstart
#5
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Quote:

jnojr wrote:
RHEL 5.4
...

I don't use kickstart much but can't understand why what you describe should not work; however, perhaps you are not getting more help because:

1. This forum is for CentOS and not RHEL.

2. 5.4 is extremely obsolete and thus unsupported. CentOS 5.8 is the current version, and RHEL is at the same release level.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/5/3 21:56
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com