[xen-tools-discuss] [RFC] Modular post-install.sh in rinse
Miguel Filho
miguel.filho at gmail.com
Thu Jul 10 20:39:41 CEST 2008
Steve and list,
Today it is possíble to change the mirror in rinse.conf, so the first
download will come from my local repository.
But during the yum bootstrap, the new system is configured to download
the RPMs from the Internet. It would be nice if I could use the same
mirror specified in rinse.conf for the post install step. I didn't
want to mess up with the code, so I figured a simple solution for me.
I added a command before ruining yum update, it looks like this:
# 3.6 BUGFIX: yumrepo
echo "BUGFIX: yumrepo"
cp /etc/yum.repos.d/CentOS-Base.repo ${prefix}/etc/yum.repos.d/ <-- my comand.
chroot ${prefix} sed -i s/\$releasever/5/g /etc/yum.repos.d/CentOS-Base.repo
chroot ${prefix} sed -i s/\$basearch/$arch/g /etc/yum.repos.d/CentOS-Base.repo
It solves my problem, put if I update rinse I will have to change
post-install.sh again.
I would like to suggest to split the default post-install.sh into
smaller scripts.
01-resolvconf.sh
05-urlgrabber.sh
10-bugfix-yum.sh
15-yum-install-yum.sh
20-make-passwd-work.sh
...
So I could just put an extra script between 05-urlgrabber.sh and
10-bugfix-yum.sh named for instance 07-my-yum-repos.sh.
I can make a patch for this and post it here.
Regards,
Miguel
--
http://osysadmin.blogspot.com
More information about the xen-tools-discuss
mailing list