RE: Extracting variables from within ks.cfg, interpreted from command-line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is what I use in my command section:
%include /tmp/partinfo

And this is in my %pre:
ETH=`grep DEVICE /tmp/netinfo | cut -d = -f 2`
IP=`ifconfig $ETH | grep inet | cut -d : -f 2 | cut -d " " -f 1`
NETMASK=`ifconfig $ETH | grep inet | cut -d : -f 4`
GATEWAY=`route -n| grep "^0.0.0.0" | cut -b 17-32 | cut -d " " -f 1`
HOSTNAME=`grep HOSTNAME /tmp/netinfo | cut -d = -f 2 | cut -d . -f 1`

cat << EOF > /tmp/buildnet
network --device $ETH --bootproto static --ip=$IP --netmask=$NETMASK
--gateway=$
GATEWAY --hostname=$HOSTNAME
EOF

This works every time, whether you get your IP address from DHCP, or
specify it on the command line.

Chip 

-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Philip Rowlands
Sent: Tuesday, March 14, 2006 11:21 PM
To: Discussion list about Kickstart
Subject: Re: Extracting variables from within ks.cfg, interpreted from
command-line

On Tue, 14 Mar 2006, Dan Trainor wrote:

> Alright, so, I think something wierd is going on.
>
> I'm still seeing Anaconda bomb out saying that /tmp/netsettings does 
> not exist.  I can verify that /tmp/netsettings does not get created.
> However, I cannot figure out why.
>
> vty3 tells me something similar to the following:
>
> :  command not founde 1:
> :  command not founde 3:
> :  command not founde 6:
[snip]

This doesn't quite feel like CRLF-line-endings, but worth a check. Can
you post your kickstart file?


Cheers,
Phil

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux