2 # $Id: install-rh7.2,v 1.1.4.2 2004/02/06 22:20:29 ensc Exp $ --*- sh -*--
4 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 # based on distrib/install-rh7.2 by Jacques Gelinas
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # This script creates a vserver from RedHat 7.2 CD. Only
22 # the first CD is used and must be mounted in /mnt/cdrom.
23 # Specify the name of the vserver
24 # "install-rh7.2 test" will create /vservers/test
26 : ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars}
27 test -e "$UTIL_VSERVER_VARS" || {
28 echo "Can not find util-vserver installation; aborting..."
31 . "$UTIL_VSERVER_VARS"
33 USR_LIB_VSERVER=$PKGLIBDIR
36 echo install-rh7.2 vserver-id
37 elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then
38 echo $VROOTDIR/$1 already exist
39 elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then
40 echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \?
42 echo `ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \
43 /mnt/cdrom/RedHat/RPMS/*.i386.rpm | wc -l` packages to install
48 mount -t proc none $VROOT/proc
49 mkdir -p $VROOT/var/lib/rpm
50 rpm --root $VROOT --initdb
51 rpm --root $VROOT -Uvh \
52 /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \
53 /mnt/cdrom/RedHat/RPMS/*.i386.rpm
54 $USR_LIB_VSERVER/install-post.sh $1