summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-10 14:39:48 +0100
committerRichard Jones <rjones@redhat.com>2009-05-10 14:39:48 +0100
commit5bd960d0d968d25a14309ed4e1e892c249730fd4 (patch)
treebc18275343584806a9de4f69469795b8c3843f47
parent035dd0842c6c6c92f8669a3f0817fb730accdd5f (diff)
downloadfebootstrap-5bd960d0d968d25a14309ed4e1e892c249730fd4.tar.gz
febootstrap-5bd960d0d968d25a14309ed4e1e892c249730fd4.tar.xz
febootstrap-5bd960d0d968d25a14309ed4e1e892c249730fd4.zip
Fix -u option (viliar.net.ru)
-rwxr-xr-xfebootstrap.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/febootstrap.sh b/febootstrap.sh
index 3cadf2a..7398516 100755
--- a/febootstrap.sh
+++ b/febootstrap.sh
@@ -130,6 +130,7 @@ gpgcheck=0
$proxy
baseurl=$updates
EOF
+addrepo=febootstrap-updates
;;
*)
cat >> $tmpdir/febootstrap.repo <<EOF
@@ -142,6 +143,7 @@ gpgcheck=0
$proxy
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=$updates&arch=$arch
EOF
+addrepo=febootstrap-updates
;;
esac
@@ -204,18 +206,24 @@ else
make_device_nodes
fi
+repos=febootstrap
+if [ -n "$addrepo" ]; then
+ repos="$repos,$addrepo"
+fi
+
# Run yum.
run_yum ()
{
yum \
-y -c "$tmpdir"/febootstrap.repo \
- --disablerepo=* --enablerepo=febootstrap \
+ --disablerepo=* --enablerepo=$repos \
--noplugins --nogpgcheck \
--installroot="$target" \
install "$@"
}
export -f run_yum
export tmpdir
+export repos
if [ $(id -u) -ne 0 ]; then
# Bash doesn't support exporting array variables, hence this