LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 05-06-2016, 01:07 PM   #1
StorageDon
LQ Newbie
 
Registered: May 2013
Posts: 10

Rep: Reputation: Disabled
Using variables in %pre section of KickStart


I am trying to set up a few ks.cfg files and would like to do the following:
Begin File:
thisHost=myhostname
thisDomain=mydomain.com
thisFQDN=$thisHost.$thisDomain
thisIP=192.168.1.15
thisNetMask=255.255.255.0
thisGateway=192.168.1.1
thisNameServer=192.168.1.1
.
.
.
[snip]
.
.
.
network --bootproto=static --device=eno16780032 --hostname=$thisHost --ip=$thisIP --netmask=$thisNetMask --gateway=$thisGateway --nameserver=$thisNameServer --noipv6 --activate
.
.
.
[snip]
.
.
.
%post
.
.
.
cat >> /etc/hosts <<HOSTS
$thisIP $thisFQDN $thisHost
HOSTS
Is this a possibility?
I would just like to set these values in one easy to see place...
 
Old 05-09-2016, 08:19 AM   #2
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Blog Entries: 4

Rep: Reputation: Disabled
I think your syntax is off. Have a look at this page for what a pre/post kickstart might look like:
https://wiki.centos.org/TipsAndTricks/KickStart

Also, at the bottom of that page is a link to a git source for community kickstarts to get a better understanding of setting system params in your kickstart.
 
  


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] Define Variables in command section of RHEL kickstart script? Rogue45 Linux - Newbie 3 07-25-2012 12:07 PM
[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
a problem with a simple scripts in my %pre section of Centos kickstart vmware the student Linux - Virtualization and Cloud 1 04-27-2010 08:49 PM
kickstart - asking for configuration in the %pre section johnnymta Linux - Server 7 08-18-2009 03:22 AM
Using parted in the pre section of my kickstart install davidr Linux - Software 0 12-09-2004 06:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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