-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup EOLed Fedora, update to latest stable (F23)
- Loading branch information
Showing
1 changed file
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2015 Red Hat Inc. | ||
# Author: <[email protected]> | ||
# Further contributions: <[email protected]> | ||
# Copyright (C) 2016 Red Hat Inc. | ||
# Author: Kashyap Chamarthy <[email protected]> | ||
# Further contributions: Prasad J. Pandit <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -32,15 +32,15 @@ | |
|
||
#set -x | ||
|
||
VERSION="0.2" | ||
VERSION="0.3" | ||
prog=`basename $0` | ||
|
||
fstype="ext4" | ||
IMAGE_HOME="/var/lib/libvirt/images" | ||
|
||
burl="http://dl.fedoraproject.org/pub" | ||
location1="$burl/fedora/linux/releases/21/Server/ARCH/os" | ||
location2="$burl/fedora/linux/releases/22/Server/ARCH/os" | ||
location1="$burl/fedora/linux/releases/22/Server/ARCH/os" | ||
location2="$burl/fedora/linux/releases/23/Server/ARCH/os" | ||
location3="$burl/fedora/linux/development/rawhide/ARCH/os" | ||
|
||
# Create a minimal kickstart file and return the temporary file name. | ||
|
@@ -123,21 +123,21 @@ usage () | |
{ | ||
echo -e "Usage: $prog [OPTIONS] <vm-name> <distro> <arch> [dest-dir]\n" | ||
|
||
echo "distro : f21, f22, rawhide, | ||
echo "distro : f22, f23, rawhide, | ||
[Or, path to HTTP URL, like]: http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/" | ||
echo "arch : x86_64, i386" | ||
echo "dest-dir : /path/dest-dir [Optional: Alternate directory to store images, | ||
assuming QEMU has access to it, i.e. 'chmod go+rx /path/dest-dir'] | ||
EXAMPLES: | ||
# Create a Fedora 22 VM: | ||
./`basename $0` vm1 f22 x86_64 | ||
# Create a Fedora-23 VM: | ||
./`basename $0` vm1 f23 x86_64 | ||
# Create a Fedora-22 VM, and store the VM disk image in the said dir: | ||
./`basename $0` vm2 f22 x86_64 /export/vmimages | ||
# Create a Fedora-23 VM, and store the VM disk image in the said dir: | ||
./`basename $0` vm2 f23 x86_64 /export/vmimages | ||
# Create a Fedora-22 VM, with the specified Fedora tree URL: | ||
# Create a Fedora-23 VM, with the specified Fedora tree URL: | ||
./`basename $0` vm3 http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/ x86_64" | ||
} | ||
|
||
|
@@ -150,7 +150,8 @@ printh () | |
printf "$format" " -f <FSTYPE>" "specify file system type, default: ext4" | ||
printf "$format" " -h" "display this help" | ||
printf "$format" " -v" "display version information" | ||
printf "\nReport bugs to Kashyap <[email protected]>\n" | ||
printf "\nReport bugs here: | ||
https://github.com/kashyapc/virt-scripts/issues\n" | ||
} | ||
|
||
check_options () | ||
|
@@ -216,25 +217,25 @@ check_options () | |
|
||
locn="" | ||
case "$dist" in | ||
f21) | ||
dist="fedora21" | ||
f22) | ||
dist="fedora22" | ||
locn=${location1/ARCH/$arch} | ||
;; | ||
|
||
f22) | ||
dist="fedora21" | ||
f23) | ||
dist="fedora23" | ||
locn=${location2/ARCH/$arch} | ||
;; | ||
|
||
rawhide) | ||
dist="fedora21" | ||
dist="fedora23" | ||
locn=${location3/ARCH/$arch} | ||
;; | ||
|
||
http*) | ||
locn=${dist/ARCH/$arch} | ||
echo "RAW version: $locn" | ||
dist="fedora21" | ||
dist="fedora23" | ||
;; | ||
|
||
*) | ||
|