#!/bin/sh # This script creates a vserver from RedHat 9.0 CD. Only # the first CD is used and must be mounted in /mnt/cdrom. # Specify the name of the vserver # "install-rh9.0 test" will create /vservers/test USR_LIB_VSERVER=/usr/lib/vserver source $USR_LIB_VSERVER/install-function.sh checkargs install-fed1.0 $* readconf $1 checkexist checkrpms /mnt/cdrom/RedHat/RPMS $USR_LIB_VSERVER/install-pre.sh $1 $VROOT mkdir -p $VROOT/proc mount -t proc none $VROOT/proc mount -t devpts none $VROOT/dev/pts mkdir -p $VROOT/var/lib/rpm rpm --root $VROOT --initdb if [ "$2" = "minimum" ] ; then echo `cat $USR_LIB_VSERVER/rh9.0-minimum | wc -l` packages to install cd /mnt/cdrom/RedHat/RPMS rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/rh9.0-minimum` else cd /mnt/cdrom/RedHat/RPMS PKGS=`ls *.noarch.rpm *.i386.rpm` MINPKGS=`cat $USR_LIB_VSERVER/rh9.0-minimum` PKGS=`$USR_LIB_VSERVER/subarg $PKGS -- $MINPKGS` echo `echo $MINPKGS $PKGS | wc -w` packages to install rpm --root $VROOT -Uvh $MINPKGS rpm --root $VROOT -Uvh $PKGS --nodeps fi umount $VROOT/proc umount $VROOT/dev/pts $USR_LIB_VSERVER/install-post.sh $1