Skip to content

Commit

Permalink
p2v: Allow 'virt-p2v-make-kickstart rhel-7.1' to set up RHEL repos.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwmjones committed Aug 5, 2015
1 parent 007004a commit da87760
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions p2v/virt-p2v-make-kickstart.in
Expand Up @@ -121,6 +121,17 @@ repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?rep
koji)
repos="$repos
repo --name=koji --baseurl=http://koji.fedoraproject.org/repos/rawhide/latest/\$basearch/ $proxy
"
;;
rhel-*)
major=$( echo "$repo" | sed 's/rhel-\([0-9]*\)\.[0-9]*/\1/' )
minor=$( echo "$repo" | sed 's/rhel-[0-9]*\.\([0-9]*\)/\1/' )
baseurl=http://download.eng.rdu2.redhat.com/released/RHEL-$major/$major.$minor
# '$basearch' cannot be used in kickstart, so:
arch=`uname -m`
repos="$repos
repo --name=rhel${major}_${minor}_server --baseurl=$baseurl/Server/$arch/os
repo --name=rhel${major}_${minor}_server_optional --baseurl=$baseurl/Server-optional/$arch/os
"
;;
*)
Expand Down
5 changes: 3 additions & 2 deletions p2v/virt-p2v-make-kickstart.pod
Expand Up @@ -33,8 +33,9 @@ will build a kickstart file for Fedora. The kickstart file will be
called F<p2v.ks> and located in the current directory.

The parameters are a list of one or more repositories. Some built-in
repositories are available: C<fedora>, C<rawhide> or C<koji>. You can
also use a URL as a parameter to point to a repository, for example:
repositories are available: C<fedora>, C<rawhide>, C<koji> or
C<rhel-VERSION> (eg. C<rhel-7.1>). You can also use a URL as a
parameter to point to a repository, for example:

virt-p2v-make-kickstart https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Everything/x86_64/os/

Expand Down

0 comments on commit da87760

Please sign in to comment.