RE: Sourcing the ks.cfg location from %post

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

 



That works awesome.

FYI for those that don't know, my /proc/cmdline in the %post looked like...

ks=nfs:192.168.1.1:/var/software/image/init/ks.cfg initrd=initrd.img
BOOT_IMAGE=vmlinuz

I was able to parse out the ks.cfg location and use it in my %post script to
grab software that was in a relative location to the ks.cfg.

Thanks Christian.

- Chris

-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Christian Drexler
Sent: December 8, 2004 9:20 AM
To: Discussion list about Kickstart
Subject: Re: Sourcing the ks.cfg location from %post


Hi Chris,
you can parse /proc/cmdline for this.

Regards

~christian
On Tue, 7 Dec 2004 18:26:32 -0500  
Chris Mckenzie <Chris.McKenzie@xxxxxxxxxxx> wrote:

> Hi guys.
>  
> I'm trying to source the ks.cfg programmatically from the ks' %post 
> using Bash.
>  
> %post scripts copying files need to have source file locations 
> hardcoded. I wanted to have a ks that at %post would get the original 
> ks= source path from my isolinux.cfg label.
>  
> The files I want to copy are relative to the ks.cfg file, and I'm NFS 
> running the ks.cfg from isolinux.cfg on an "Install CD".
>  
> I was hoping to have my %post script derive the relative location of 
> the files to grab from the location of the ks.cfg.
>  
> For example:
>  
> isolinux.cfg label or at the "Install CD" boot prompt:
>  
>     ks=nfs:10.4.146.47:/var/software/init/ks.cfg
>  
> Then from the ks.cfg %post:
>  
>     %post
>     echo `dirname $0`
>  
> I was hoping `dirname $0` would give me the source path of the ks.cfg, 
> but it pointed to /tmp. (which is where I'll assume the installer 
> copied and read ks.cfg from)
>  
> Hardcoding the same base path 3 times isn't my preference and I can't 
> pass vars in a ks.
>  
> Any ideas?
>  
> Thanks!!!
>  
> - Chris


-- 
Christian Drexler 		mail: cdrexler@xxxxxxxxxxxxxx
Systems Administrator		phone: +49 211 5296 322
Toshiba Electronics Europe 	fax: +49 211 5296 79322
Duesseldorf, Germany		http://www.toshiba-europe.com


**********************************************************************
CONFIDENTIALITY DISCLAIMER

The information in this email and in any attachments is confidential and may
be 
privileged.  If you are not the intended recipient, please destroy this
message,  delete any copies held on your systems and notify the sender
immediately.
  
You should not retain, copy or use this email for any purpose outside of any
NDA currently existing between Toshiba Electronics Europe GmbH and
yourselves.
**********************************************************************

_______________________________________________
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