diff -NurpP --minimal vserver-0.29/newvserver vserver-0.29-fix01/newvserver --- vserver-0.29/newvserver Thu Dec 4 05:53:16 2003 +++ vserver-0.29-fix01/newvserver Sun Dec 28 18:14:25 2003 @@ -17,7 +17,7 @@ CAPCHROOT_CMD=$USR_LIB_VSERVER/capchroot VSERVERKILLALL_CMD=$USR_LIB_VSERVER/vserverkillall ETC_VSERVERS=/etc/vservers -source /etc/vservers.conf +. /etc/vservers.conf usage(){ cat <<-EOF >&2 @@ -105,8 +105,8 @@ check_cd(){ # $1 is the vserver path (/vserver/id) set_fstab(){ mkdir -p $1/etc - echo /dev/hdv1 / ext2 defaults 1 1 >$1/etc/fstab - echo /dev/hdv1 / ext2 rw 1 1 >$1/etc/mtab + echo /dev/hdv1 / ufs defaults 1 1 >$1/etc/fstab + echo /dev/hdv1 / ufs rw,usrquota,grpquota 1 1 >$1/etc/mtab } # Show a progress bar during installation diff -NurpP --minimal vserver-0.29/printconf.sh vserver-0.29-fix01/printconf.sh --- vserver-0.29/printconf.sh Wed Dec 3 23:52:29 2003 +++ vserver-0.29-fix01/printconf.sh Sun Dec 28 19:04:11 2003 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Source a sh-style configuration file and prints the result # in an easy program parseable way (VAR=VALUE, without quotes) # This script also try to normalise some values to simplify other tools. @@ -11,10 +11,10 @@ Q= ONLYVALUE=no while true do - if [ "$1" == "--quote" ] ; then + if [ "$1" = "--quote" ] ; then Q='"' shift - elif [ "$1" == "--onlyvalue" ] ; then + elif [ "$1" = "--onlyvalue" ] ; then ONLYVALUE=yes shift else @@ -50,8 +50,8 @@ if [ $# != 1 ] ; then exit 1 else # We source this file in case it is not sourced by the vserver configuration - source /etc/vservers.conf - source /etc/vservers/$1.conf + . /etc/vservers.conf + . /etc/vservers/$1.conf if [ "$VSERVERDIR" = "" ] ;then VSERVERDIR=$VSERVERS_ROOT/$1 fi @@ -69,5 +69,6 @@ else printvar S_CAPS $S_CAPS printvar S_NICE $S_NICE printvar S_FLAGS $S_FLAGS + printvar S_CONTEXT $S_CONTEXT fi diff -NurpP --minimal vserver-0.29/vserver vserver-0.29-fix01/vserver --- vserver-0.29/vserver Wed Dec 10 16:57:26 2003 +++ vserver-0.29-fix01/vserver Sun Dec 28 19:26:22 2003 @@ -10,7 +10,7 @@ CAPCHROOT_CMD=$USR_LIB_VSERVER/capchroot VSERVERKILLALL_CMD=$USR_LIB_VSERVER/vserverkillall DEFAULTPATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin -source /etc/vservers.conf +. /etc/vservers.conf # Read the vserver configuration file and perform some sanity checks readconf(){ @@ -195,15 +195,16 @@ generatemtab(){ if [ "$src" != "none" ] ; then case $dir in $VSERVERDIR/*) + rel=`echo $dir | sed "s|$VSERVERDIR||"` case $src in /dev/*) - echo /dev/hdv$NODEV ${dir/$VSERVERDIR/} $fs $flags $stuff >>$MTABFILE + echo /dev/hdv$NODEV $rel $fs $flags $stuff >>$MTABFILE rm -f $VSERVERDIR/dev/hdv$NODEV touch $VSERVERDIR/dev/hdv$NODEV NODEV=`expr $NODEV + 1` ;; *) - echo $src ${dir/$VSERVERDIR/} $fs $flags $stuff >>$MTABFILE + echo $src $rel $fs $flags $stuff >>$MTABFILE ;; esac ;; @@ -445,9 +446,10 @@ ULIMIT="-HS -u 1000" # you can to give a little more capabilities (such as CAP_NET_RAW) # S_CAPS="CAP_NET_RAW" S_CAPS="" -# Select an unused context (this is optional) -# The default is to allocate a free context on the fly -# In general you don't need to force a context +# Select an unused context (this is advised) +# The default is to allocate a dynamic context on the fly +# For context file tagging (quota and disk limits), a +# static context is required. #S_CONTEXT= EOF echo $CONF has been created. Look at it\!