X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=distrib%2Finstall-rh7.2;fp=distrib%2Finstall-rh7.2;h=e3bd46132aec873c5164fcbb197e5c63fab94c29;hb=06e1018272502e1d15d6d8f32b80fa96420785b8;hp=0000000000000000000000000000000000000000;hpb=8a59994861a17eb92c11553d88631757ee8e63c3;p=util-vserver.git diff --git a/distrib/install-rh7.2 b/distrib/install-rh7.2 new file mode 100644 index 0000000..e3bd461 --- /dev/null +++ b/distrib/install-rh7.2 @@ -0,0 +1,58 @@ +#!/bin/sh +# $Id: install-rh7.2,v 1.1.4.2 2004/02/06 22:20:29 ensc Exp $ --*- sh -*-- + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-rh7.2 by Jacques Gelinas +# +# 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; either version 2, or (at your option) +# any later version. +# +# 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 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. + +# This script creates a vserver from RedHat 7.2 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-rh7.2 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# != 1 ] ; then + echo install-rh7.2 vserver-id +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then + echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \? +else + echo `ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm | wc -l` packages to install + VROOT=$VROOTDIR/$1 + mkdir -p -m755 $VROOT + chattr -t $VROOT + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + rpm --root $VROOT -Uvh \ + /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm + $USR_LIB_VSERVER/install-post.sh $1 + umount $VROOT/proc +fi + +