#!/bin/sh # This script creates a vserver from RedHat 8.0 CD. Only # the first CD is used and must be mounted in /mnt/cdrom. # Specify the name of the vserver # "install-rh8.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/rh8.0-minimum | wc -l` packages to install cd /mnt/cdrom/RedHat/RPMS rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/rh8.0-minimum` else PKGS=`ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ /mnt/cdrom/RedHat/RPMS/*.i386.rpm` for except in control-center iptables kernel-pcmcia-cs\ nfs-utils pciutils quota rp-pppoe tcpdump \ lokkit kudzu-devel pciutils-devel do PKGS=`ls $PKGS | grep -v $except` done echo `echo $PKGS | wc -w` packages to install rpm --root $VROOT -Uvh $PKGS fi umount $VROOT/proc umount $VROOT/dev/pts $USR_LIB_VSERVER/install-post.sh $1