SCIENTIFIC-LINUX-USERS Archives

October 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steven Haigh <[log in to unmask]>
Reply To:
Steven Haigh <[log in to unmask]>
Date:
Sat, 25 Oct 2014 15:06:02 +1100
Content-Type:
multipart/signed
Parts/Attachments:
text/plain (2180 bytes) , signature.asc (849 bytes)
Hi all,

So after getting my kickstart file working, I'm working on some post
scripting to configure up a few local things.

So far, I'm doing things like:
## Disable sl6 repos
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/sl.repo

## Enable the sl6x repos and the mirrorlists...
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/sl6x.repo
sed -i 's/#mirrorlist/mirrorlist/g' /etc/yum.repos.d/sl6x.repo

I also want to go and put a custom URL in the sl6x.repo to go to my
local repository that I mirror.

That means I'd want to turn this:
[sl6x]
name=Scientific Linux 6x - $basearch
baseurl=http://ftp.scientificlinux.org/linux/scientific/6x/$basearch/os/

http://ftp1.scientificlinux.org/linux/scientific/6x/$basearch/os/

http://ftp2.scientificlinux.org/linux/scientific/6x/$basearch/os/

ftp://ftp.scientificlinux.org/linux/scientific/6x/$basearch/os/
mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6x.txt
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern

to this:
[sl6x]
name=Scientific Linux 6x - $basearch
baseurl=        https://my.internal.server/sl6x/$basearch/os/

http://ftp.scientificlinux.org/linux/scientific/6x/$basearch/os/

http://ftp1.scientificlinux.org/linux/scientific/6x/$basearch/os/

http://ftp2.scientificlinux.org/linux/scientific/6x/$basearch/os/

ftp://ftp.scientificlinux.org/linux/scientific/6x/$basearch/os/
mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6x.txt
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern

There aren't a great deal of tools within the kickstart environment to
do this, I think I'm stuck with using something like sed - but not sure
quite how to do this...

It also gets difficult as the URLs are different - so I either need to
parse the URL to then pass that back, or some other magic...

In my thinking about this - I thought I'd reach out and see if anyone
else has done this before :)

-- 
Steven Haigh

Email: [log in to unmask]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897



ATOM RSS1 RSS2