- # download a mini fedora into a cache
- echo "Downloading fedora minimal ..."
- YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck --releasever=$release"
- PKG_LIST="yum initscripts passwd rsyslog vim-minimal dhclient chkconfig rootfiles policycoreutils openssh-server openssh-clients"
-
-
+ mkdir -p $INSTALL_ROOT/etc/yum.repos.d
+ mkdir -p $INSTALL_ROOT/dev
+ mknod -m 0444 $INSTALL_ROOT/dev/random c 1 8
+ mknod -m 0444 $INSTALL_ROOT/dev/urandom c 1 9
+
+ # copy yum config and repo files
+ cp /etc/yum.conf $INSTALL_ROOT/etc/
+ cp /etc/yum.repos.d/fedora* $INSTALL_ROOT/etc/yum.repos.d/
+
+ # append fedora repo files with desired $release and $basearch
+ for f in $INSTALL_ROOT/etc/yum.repos.d/*
+ do
+ sed -i "s/\$basearch/$arch/g; s/\$releasever/$release/g;" $f
+ done
+