[Ovirt-devel] [PATCH] added tools/get-ovirt-node-image tools/generate-ovirt-node-pxe-tree
David Huff
dhuff at redhat.com
Wed Jul 29 00:14:49 UTC 2009
---
Makefile.am | 12 ++++++---
tools/generate-ovirt-node-pxe-tree | 44 ++++++++++++++++++++++++++++++++++++
tools/get-ovirt-node-image | 28 ++++++++++++++++++++++
3 files changed, 80 insertions(+), 4 deletions(-)
create mode 100755 tools/generate-ovirt-node-pxe-tree
create mode 100755 tools/get-ovirt-node-image
diff --git a/Makefile.am b/Makefile.am
index a44ae49..2be9146 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,15 +38,19 @@ EXTRA_DIST = \
.gitignore \
$(PACKAGE).spec \
$(PACKAGE).spec.in \
+ ovirt-node-recipe.spec \
+ ovirt-node-recipe.spec.in \
common-blacklist.ks \
common-install.ks \
common-pkgs.ks \
common-post.ks \
$(PACKAGE).ks \
- create-ovirt-iso-nodes \
- edit-livecd \
- livecd-setauth \
- livecd-rpms \
+ tools/create-ovirt-iso-nodes \
+ tools/edit-livecd \
+ tools/livecd-setauth \
+ tools/livecd-rpms \
+ tools/generate-ovirt-node-pxe-tree \
+ tools/get-ovirt-node-image \
README
DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz \
diff --git a/tools/generate-ovirt-node-pxe-tree b/tools/generate-ovirt-node-pxe-tree
new file mode 100755
index 0000000..f4d69ab
--- /dev/null
+++ b/tools/generate-ovirt-node-pxe-tree
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Script to generate a pxe tree form a node image
+# Copyright 2009 Red Hat, Inc.
+# Written by David Huff <dhuff at redhat.com>
+#
+# 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
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+IMAGE_NAME="ovirt-node-image.iso"
+OVIRT_NODE_DIR="/usr/share/ovirt-node-image/"
+
+if [ $(id -u) != 0 ]; then
+ echo "You need to be root to run this script."
+ exit 1
+fi
+
+if [ ! -f ${OVIRT_NODE_DIR}${IMAGE_NAME} ]; then
+ echo "Warning: ${IMAGE_NAME} not found."
+ echo "you can download it from spins.fedoraproject.org"
+ echo "by running: get-ovirt-node-image"
+ exit 1
+fi
+
+cat <<EOF
+
+Writing pxe tree to ${OVIRT_NODE_DIR}tftpboot....
+
+EOF
+
+cd $OVIRT_NODE_DIR
+rm -rf tftpboot
+livecd-iso-to-pxeboot $IMAGE_NAME
+cobbler sync > /dev/null 2>&1 || :
\ No newline at end of file
diff --git a/tools/get-ovirt-node-image b/tools/get-ovirt-node-image
new file mode 100755
index 0000000..1a3ee94
--- /dev/null
+++ b/tools/get-ovirt-node-image
@@ -0,0 +1,28 @@
+#!/bin/bash
+#
+# Script to get ovirt-node-image form spins.fedoraproject.org
+# Copyright 2009 Red Hat, Inc.
+# Written by David Huff <dhuff at redhat.com>
+#
+# 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
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+OVIRT_NODE_DIR="/usr/share/ovirt-node-image/"
+OVIRT_NODE_URL="http://spins.fedoraproject.org/torrents/Fedora-10-x86_64-AOS.torrent"
+
+if [ $(id -u) != 0 ]; then
+ echo "You need to be root to run this script."
+ exit 1
+fi
+
+bittorrent-console --no_spew --max_uploads 0 --save_in $OVIRT_NODE_DIR $OVIRT_NODE_URL
\ No newline at end of file
--
1.6.0.6
More information about the ovirt-devel
mailing list