#!/bin/sh # This script creates a (really really) tiny vserver using Yum # The configuration file /usr/lib/vserver/yum.conf must be properly adjusted beforehand. # Note: newvserver text-mode output will be garbled # Specify the name of the vserver # "install-yum test" will create /vservers/test USR_LIB_VSERVER=/usr/lib/vserver source $USR_LIB_VSERVER/install-function.sh readconf $1 checkexist $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 rpm --root $VROOT -Uvh $USR_LIB_VSERVER/fakerpm/kernel-2.6.14-1.i386.rpm $USR_LIB_VSERVER/fakerpm/dev-0.0-1.i386.rpm YUM_CMD="yum --installroot=$VROOT -y -c $USR_LIB_VSERVER/yum.conf" BASE_PKGS="rootfiles vim-minimal passwd vixie-cron crontabs tmpwatch logrotate yum" $YUM_CMD install $BASE_PKGS $YUM_CMD clean all rm -f $VROOT/var/lib/rpm/__db.00? umount $VROOT/proc umount $VROOT/dev/pts $USR_LIB_VSERVER/install-post.sh $1